aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-07-30 13:04:39 -0700
committerJunio C Hamano <gitster@pobox.com>2012-07-30 13:04:39 -0700
commit9b67f560f473ec84c9ea77a1fa6378bc7cc29d9d (patch)
treea3f73f65ef4a6da836d1a265d4b5226d0737839c
parent8ba105dda861d33f3d7c3b9989592c1605027116 (diff)
parent14bf2d58bc3b202da3ca34cfdf72392889135411 (diff)
downloadgit-9b67f560f473ec84c9ea77a1fa6378bc7cc29d9d.tar.gz
git-9b67f560f473ec84c9ea77a1fa6378bc7cc29d9d.tar.xz
Merge branch 'pg/maint-1.7.9-am-where-is-patch' into maint
When "git am" failed, old timers knew to check .git/rebase-apply/patch to see what went wrong, but we never told the users about it. * pg/maint-1.7.9-am-where-is-patch: am: indicate where a failed patch is to be found
-rw-r--r--Documentation/config.txt3
-rwxr-xr-xgit-am.sh5
2 files changed, 8 insertions, 0 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 915cb5a54..b49feb582 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -176,6 +176,9 @@ advice.*::
Advice shown when you used linkgit:git-checkout[1] to
move to the detach HEAD state, to instruct how to create
a local branch after the fact.
+ amWorkDir::
+ Advice that shows the location of the patch file when
+ linkgit:git-am[1] fails to apply it.
--
core.fileMode::
diff --git a/git-am.sh b/git-am.sh
index f8b7a0cb6..9abad36ab 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -855,6 +855,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