diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2006-12-23 03:44:47 -0500 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-12-23 01:29:37 -0800 |
commit | e0ec18192db8a5f80705a81dfaa1caa3e6c48c1a (patch) | |
tree | 66bba834a3c73b3c10f916578da0fbd71b9a8f50 /t/t6024-recursive-merge.sh | |
parent | d9606e85cdf26b738786b5e5289bf8335656e95e (diff) | |
download | git-e0ec18192db8a5f80705a81dfaa1caa3e6c48c1a.tar.gz |
Display 'theirs' branch name when possible in merge.
Displaying the SHA1 of 'their' branch (the branch being merged into
the current branch) is not nearly as friendly as just displaying
the name of that branch, especially if that branch is already local
to this repository.
git-merge now sets the environment variable 'GITHEAD_%(sha1)=%(name)'
for each argument it gets passed, making the actual input name that
resolved to the commit '%(sha1)' easily available to the invoked
merge strategy.
git-merge-recursive makes use of these environment variables when
they are available by using '%(name)' whenever it outputs the commit
identification rather than '%(sha1)'. This is most obvious in the
conflict hunks created by xdl_merge:
$ git mege sideb~1
<<<<<<< HEAD:INSTALL
Good!
=======
Oops.
>>>>>>> sideb~1:INSTALL
[jc: adjusted a test script and a minor constness glitch.]
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 't/t6024-recursive-merge.sh')
-rw-r--r-- | t/t6024-recursive-merge.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/t/t6024-recursive-merge.sh b/t/t6024-recursive-merge.sh index 964010e764..69b18f7d81 100644 --- a/t/t6024-recursive-merge.sh +++ b/t/t6024-recursive-merge.sh @@ -59,18 +59,18 @@ GIT_AUTHOR_DATE="2006-12-12 23:00:08" git commit -m F test_expect_failure "combined merge conflicts" "git merge -m final G" cat > expect << EOF -<<<<<<< HEAD/a1 +<<<<<<< HEAD:a1 F ======= G ->>>>>>> 26f86b677eb03d4d956dbe108b29cb77061c1e73/a1 +>>>>>>> G:a1 EOF test_expect_success "result contains a conflict" "diff -u expect a1" git ls-files --stage > out cat > expect << EOF -100644 f16f906ab60483c100d1241dfc39868de9ec9fcb 1 a1 +100644 da056ce14a2241509897fa68bb2b3b6e6194ef9e 1 a1 100644 cf84443e49e1b366fac938711ddf4be2d4d1d9e9 2 a1 100644 fd7923529855d0b274795ae3349c5e0438333979 3 a1 EOF |