Paul Gortmaker <paul.gortma...@windriver.com> writes:
> I'm fine with the changes you've proposed below,...
Here is what I committed for today's integration run. Will be
pushed out on 'pu'.
-- >8 --
From: Paul Gortmaker <paul.gortma...@windriver.com>
Date: Fri, 13 Jul 2012 11:51:30 -0400
Subject: [PATCH] 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 <paul.gortma...@windriver.com>
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Documentation/config.txt | 3 +++
git-am.sh | 5 +++++
2 files changed, 8 insertions(+)
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 0e1168c..b1f0a75 100644
@@ -143,6 +143,9 @@ advice.*::
Advice shown when you used linkgit:git-checkout to
move to the detach HEAD state, to instruct how to create
a local branch after the fact.
+ Advice that shows the location of the patch file when
+ linkgit:git-am fails to apply it.
diff --git a/git-am.sh b/git-am.sh
index cb833e2..f1ae932 100755
@@ -834,6 +834,11 @@ did you forget to use 'git add'?"
if test $apply_status != 0
eval_gettextln 'Patch failed at $msgnum $FIRSTLINE'
+ if test "$(git config --bool advice.amworkdir)" != false
+ eval_gettextln "The copy of the patch that failed is
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html