author | Shawn O. Pearce <spearce@spearce.org> | |
Sat, 23 Dec 2006 08:44:47 +0000 (03:44 -0500) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 23 Dec 2006 09:29:37 +0000 (01:29 -0800) | ||
commit | e0ec18192db8a5f80705a81dfaa1caa3e6c48c1a | |
tree | 66bba834a3c73b3c10f916578da0fbd71b9a8f50 | tree | snapshot |
parent | d9606e85cdf26b738786b5e5289bf8335656e95e | commit | diff |
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>
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>
git-merge.sh | diff | blob | history | |
merge-recursive.c | diff | blob | history | |
t/t6024-recursive-merge.sh | diff | blob | history |