summaryrefslogtreecommitdiff
path: root/git-am.sh
diff options
context:
space:
mode:
authorSimon Ruderich <simon@ruderich.org>2013-03-21 03:40:17 +0100
committerJunio C Hamano <gitster@pobox.com>2013-03-21 08:09:35 -0700
commitb34a912989624de37f859b4d70d9eab4cfe285dd (patch)
treeb8236371505ac526ccb596c0ecb893ce83d4cc11 /git-am.sh
parent7b9a41987aea4f5eb4afe1ff84302b5c5fa4e77a (diff)
downloadgit-b34a912989624de37f859b4d70d9eab4cfe285dd.tar.gz
git-am: show the final log message on "Applying:" indicator
The "Applying:" message "git am" shows to tell the user which patch is being applied has traditionally been to help identifying the input, but we started showing the edited result since f23272f3fd84 (git-am -i: report rewritten title, 2007-12-04), because it was found more confusing to show the original during an interactive session. Treat the modification by the applypatch-msg hook in a similar way and use the edited result in the progress indication, even though this is usually not interactive. Signed-off-by: Simon Ruderich <simon@ruderich.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-am.sh')
-rwxr-xr-xgit-am.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/git-am.sh b/git-am.sh
index 202130f888..c092855dd7 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -778,13 +778,6 @@ To restore the original branch and stop patching run \"\$cmdline --abort\"."
action=yes
fi
- if test -f "$dotest/final-commit"
- then
- FIRSTLINE=$(sed 1q "$dotest/final-commit")
- else
- FIRSTLINE=""
- fi
-
if test $action = skip
then
go_next
@@ -797,6 +790,13 @@ To restore the original branch and stop patching run \"\$cmdline --abort\"."
stop_here $this
fi
+ if test -f "$dotest/final-commit"
+ then
+ FIRSTLINE=$(sed 1q "$dotest/final-commit")
+ else
+ FIRSTLINE=""
+ fi
+
say "$(eval_gettext "Applying: \$FIRSTLINE")"
case "$resolved" in