git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-am: fix "Applying" message when applypatch-hook was run
@ 2013-03-20 23:18 Simon Ruderich
  2013-03-20 23:36 ` Matthieu Moy
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Ruderich @ 2013-03-20 23:18 UTC (permalink / raw)
  To: git

---
Hello,

This patch fixes a minor issue with git-am. When the
applypatch-hook modifies the commit message, git-am displays the
original message. This patch updates the message to use the
modified version.

Regards
Simon

 git-am.sh | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/git-am.sh b/git-am.sh
index 202130f..0997077 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -795,6 +795,14 @@ To restore the original branch and stop patching run \"\$cmdline --abort\"."
 	then
 		"$GIT_DIR"/hooks/applypatch-msg "$dotest/final-commit" ||
 		stop_here $this
+
+		# applypatch-msg can update the commit message.
+		if test -f "$dotest/final-commit"
+		then
+			FIRSTLINE=$(sed 1q "$dotest/final-commit")
+		else
+			FIRSTLINE=""
+		fi
 	fi
 
 	say "$(eval_gettext "Applying: \$FIRSTLINE")"
-- 
1.8.2

-- 
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-03-21  2:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-20 23:18 [PATCH] git-am: fix "Applying" message when applypatch-hook was run Simon Ruderich
2013-03-20 23:36 ` Matthieu Moy
2013-03-20 23:52   ` Junio C Hamano
2013-03-21  2:40   ` Simon Ruderich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).