Linus Torvalds wrote: > > [ Side note: I should make "git-resolve-script" run "git-rev-parse" on its > arguments, so that it would expand HEAD and MERGE_HEAD on its own. Maybe > somebody who is interested in this script might want to do that? Hint > hint. ] Got it. Included below. > Note how we could make both of us happy by saving that temporary > MERGE_HEAD information somewhere _else_ instead. Maybe the answer is to > only use "MERGE_HEAD" for the "merge manually" case, and use something > else for the "this was the merge you tried to do last" case? I like the "everybody happy" idea... How about "LAST_MERGE"? And something like this? /dan --- [PATCH] git-resolve-script: Add LAST_MERGE and use git-rev-parse Make git-resolve-script only write MERGE_HEAD if a merge actually occurred. All merge failures leave ORIG_HEAD and LAST_MERGE behind (instead of ORIG_HEAD and MERGE_HEAD). Use git-rev-parse to expand arguments (and check for bad ones). Signed-off-by: Dan Holmsand