Make merge comment git-pull makes for an octopus a bit prettier.
authorJunio C Hamano <junkio@cox.net>
Wed, 14 Sep 2005 06:49:55 +0000 (23:49 -0700)
committerJunio C Hamano <junkio@cox.net>
Wed, 14 Sep 2005 06:49:55 +0000 (23:49 -0700)
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-pull.sh
index c1b4474495f883910f50610856c8fc39dad3f89c..dd36c615b60665d128e9dc07c3988d9f2bac3878 100755 (executable)
@@ -24,9 +24,11 @@ then
                die "You need to first update your working tree."
 fi
 
-merge_head=$(sed -e 's/        .*//' "$GIT_DIR"/FETCH_HEAD | tr '\012' ' ')
-merge_name=$(sed -e 's/^[0-9a-f]*      //' "$GIT_DIR"/FETCH_HEAD |
-        tr '\012' ' ')
+merge_head=$(sed -e 's/        .*//' "$GIT_DIR"/FETCH_HEAD)
+merge_name=$(
+    perl -e 'print join("; ", map { chomp; s/^[0-9a-f]*        //; $_ } <>)' \
+    "$GIT_DIR"/FETCH_HEAD
+)
 
 case "$merge_head" in
 '')