Skip to content

Commit 9b67f56

Browse files
committed
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
2 parents 8ba105d + 14bf2d5 commit 9b67f56

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Documentation/config.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,9 @@ advice.*::
176176
Advice shown when you used linkgit:git-checkout[1] to
177177
move to the detach HEAD state, to instruct how to create
178178
a local branch after the fact.
179+
amWorkDir::
180+
Advice that shows the location of the patch file when
181+
linkgit:git-am[1] fails to apply it.
179182
--
180183

181184
core.fileMode::

git-am.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,11 @@ did you forget to use 'git add'?"
855855
if test $apply_status != 0
856856
then
857857
eval_gettextln 'Patch failed at $msgnum $FIRSTLINE'
858+
if test "$(git config --bool advice.amworkdir)" != false
859+
then
860+
eval_gettextln "The copy of the patch that failed is found in:
861+
$dotest/patch"
862+
fi
858863
stop_here_user_resolve $this
859864
fi
860865

0 commit comments

Comments
 (0)