summaryrefslogtreecommitdiff
path: root/git-merge.sh
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@dev.mellanox.co.il>2007-03-22 11:07:30 +0200
committerJunio C Hamano <junkio@cox.net>2007-03-22 03:01:43 -0700
commit85295a52e683a24d8404c6989d8b8f134a0ea684 (patch)
tree3a215188430f9536bf180d0621e3243b8775b172 /git-merge.sh
parenta1bf91e081de236af34bf8acd484881ce146fc93 (diff)
downloadgit-85295a52e683a24d8404c6989d8b8f134a0ea684.tar.gz
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>
Diffstat (limited to 'git-merge.sh')
-rwxr-xr-xgit-merge.sh4
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