From 14bf2d58bc3b202da3ca34cfdf72392889135411 Mon Sep 17 00:00:00 2001 From: Paul Gortmaker Date: Fri, 13 Jul 2012 11:51:30 -0400 Subject: am: indicate where a failed patch is to be found If "git am" fails to apply something, the end user may need to know where to find the patch that failed to apply, so that the user can do other things (e.g. trying "GNU patch" on it, running "diffstat" to see what it tried to change, etc.) The input to "am" may have contained more than one patch, or the message may have been MIME encoded, and knowing what the user fed to "am" does not help very much for this purpose. Also introduce advice.amworkdir configuration to allow people who learned where to look to squelch this message. Signed-off-by: Paul Gortmaker Signed-off-by: Junio C Hamano --- git-am.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'git-am.sh') diff --git a/git-am.sh b/git-am.sh index cb833e217a..f1ae932fa7 100755 --- a/git-am.sh +++ b/git-am.sh @@ -834,6 +834,11 @@ did you forget to use 'git add'?" if test $apply_status != 0 then eval_gettextln 'Patch failed at $msgnum $FIRSTLINE' + if test "$(git config --bool advice.amworkdir)" != false + then + eval_gettextln "The copy of the patch that failed is found in: + $dotest/patch" + fi stop_here_user_resolve $this fi -- cgit v1.3