@matheusbsbs / matheus-bagliano / commits / 85295a52e6
Fork 0

git-merge: Put FETCH_HEAD data in merge commit message

This makes git-fetch <URL> && git-merge FETCH_HEAD produce the same merge message as git-pull <URL>. Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il> Signed-off-by: Junio C Hamano <junkio@cox.net>

Michael S. Tsirkin committed Mar 22, 2007 at 11:07 UTC 85295a52e683a24d8404c6989d8b8f134a0ea684
1 file changed +4
git-merge.sh
+4
@@ -108,6 +108,10 @@ merge_name () {
108 git-show-ref -q --verify "refs/heads/$truname" 2>/dev/null
109 then
110 echo "$rh branch '$truname' (early part) of ."
111 + elif test "$remote" = "FETCH_HEAD" -a -r "$GIT_DIR/FETCH_HEAD"
112 + then
113 + sed -e 's/ not-for-merge / /' -e 1q \
114 + "$GIT_DIR/FETCH_HEAD"
115 else
116 echo "$rh commit '$remote'"
117 fi