From: Michael S. Tsirkin Date: Thu, 22 Mar 2007 09:07:30 +0000 (+0200) Subject: git-merge: Put FETCH_HEAD data in merge commit message X-Git-Tag: v1.5.1-rc2~33 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=85295a52e683a24d8404c6989d8b8f134a0ea684;p=git.git git-merge: Put FETCH_HEAD data in merge commit message This makes git-fetch && git-merge FETCH_HEAD produce the same merge message as git-pull . Signed-off-by: Michael S. Tsirkin Signed-off-by: Junio C Hamano --- diff --git a/git-merge.sh b/git-merge.sh index 8759c5a7e..fa4589173 100755 --- a/git-merge.sh +++ b/git-merge.sh @@ -108,6 +108,10 @@ merge_name () { git-show-ref -q --verify "refs/heads/$truname" 2>/dev/null then echo "$rh branch '$truname' (early part) of ." + elif test "$remote" = "FETCH_HEAD" -a -r "$GIT_DIR/FETCH_HEAD" + then + sed -e 's/ not-for-merge / /' -e 1q \ + "$GIT_DIR/FETCH_HEAD" else echo "$rh commit '$remote'" fi