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>
This commit is contained in:
Michael S. Tsirkin 2007-03-22 11:07:30 +02:00 committed by Junio C Hamano
parent a1bf91e081
commit 85295a52e6

View file

@ -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