How do I disable git cherry-pick's -e option?

316 views Asked by At

Whenever I type "git cherry-pick --continue", it always brings up an editor that I have to "ctrl-x" out of. This seems to resemble "git cherry-pick"'s "-e" option, which appears to be automatically enabled. I would like to disable it. Alternatively, I would like to have a line in my Python program that can "ctrl-x" out of it as soon as it pops up. How can I do this?

I'm running Python code which finds the commits a commit you want to cherry pick depends on. In the process, I run code that deletes the "<<<", "|||", "===" and ">>>" lines, as well as the stuff between "<<<" and "===" in merge conflicts caused by commits that need to be later be manually merged. This lets me continue cherry-picking other commits dependent on it:

 85             if commit in divergentCommits:
 86                 problems = divergentConflicts[commit]
 87                 for problem in problems:
 88                     fileName = problem[0]
 89                     problemFixes = problem[1]
 90                     for fix in problemFixes:
 91                         print "sed --in-place " + fix + fileName
 92                         os.system("sed --in-place " + fix + fileName)
 93                     os.system("git add " + fileName)
 94                     os.system("git cherry-pick --continue")
1

There are 1 answers

3
o11c On

You can always put GIT_EDITOR=/bin/true in the environment to disable all interactive requests.