stash: invoke rerere in case of conflict
"stash apply" directly calls a backend merge function which does not automatically invoke rerere. This confuses mergetool when leftover rerere state is left behind from previous merges. Invoke rerere explicitly when we encounter a conflict during stash apply. This turns the test introduced by the previous commit to succeed. Signed-off-by: Phil Hord <hordp@cisco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Phil Hord committed
Jul 10, 2012 at 18:52 UTC
743bf6d8b07f0c5717bf5c37b8b50ae9de619c83
2 files changed
+2
-1
git-stash.sh
+1
@@ -469,6 +469,7 @@ apply_stash () {
469
else
470
# Merge conflict; keep the exit status from merge-recursive
471
status=$?
472
+ git rerere
473
if test -n "$INDEX_OPTION"
474
then
475
gettextln "Index was not unstashed." >&2
t/t7610-mergetool.sh
+1
-1
@@ -203,7 +203,7 @@ test_expect_success 'mergetool skips resolved paths when rerere is active' '
203
git reset --hard
204
'
205
206
-test_expect_failure 'conflicted stash sets up rerere' '
206
+test_expect_success 'conflicted stash sets up rerere' '
207
git config rerere.enabled true &&
208
git checkout stash1 &&
209
echo "Conflicting stash content" >file11 &&