diff options
author | Michael S. Tsirkin <mst@dev.mellanox.co.il> | 2007-03-22 11:07:30 +0200 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-03-22 03:01:43 -0700 |
commit | 85295a52e683a24d8404c6989d8b8f134a0ea684 (patch) | |
tree | 3a215188430f9536bf180d0621e3243b8775b172 | |
parent | git-rebase: make 'rebase HEAD branch' work as expected. (diff) | |
download | tgif-85295a52e683a24d8404c6989d8b8f134a0ea684.tar.xz |
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>
-rwxr-xr-x | git-merge.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/git-merge.sh b/git-merge.sh index 8759c5a7e0..fa4589173f 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 |