Closed alindeman closed 12 years ago
My gut tells me that git_tracker is modifying the .git/EDIT_COMMIT_MSG
file which in turn causes git to fire up the $EDITOR
. Likely, git_tracker should NO-OP when source
is merge. See: http://book.git-scm.com/5_git_hooks.html
@alindeman I'm having trouble recreating this. Perhaps the issue was fixed by some changes I've made recently to fix a few other issues?
Can you try with the latest version, 1.2.0+, and see if its still happening? Hit me up in iChat the next time this thing bites you and we'll troubleshoot it together!
Well, shiiiiittt. Not a bug in git_tracker, it's a change in git 1.7.10.
From the release notes:
* From this release on, the "git merge" command in an interactive
session will start an editor when it automatically resolves the
merge for the user to explain the resulting commit, just like the
"git commit" command does when it wasn't given a commit message.
If you have a script that runs "git merge" and keeps its standard
input and output attached to the user's terminal, and if you do not
want the user to explain the resulting merge commits, you can
export GIT_MERGE_AUTOEDIT environment variable set to "no", like
this:
#!/bin/sh
GIT_MERGE_AUTOEDIT=no
export GIT_MERGE_AUTOEDIT
to disable this behavior (if you want your users to explain their
merge commits, you do not have to do anything). Alternatively, you
can give the "--no-edit" option to individual invocations of the
"git merge" command if you know everybody who uses your script has
Git v1.7.8 or newer.
Sorry for the bug report; it must have coincided with me upgrading git. I will probably be setting that environment variable, as modifying merge commit messages doesn't seem that useful to my current workflow.
Without git_tracker and under a no conflict scenario,
git merge --no-ff <branch>
will not prompt for a commit message. With git_tracker,$EDITOR
is always started and prompts for a commit message.