summaryrefslogtreecommitdiff
path: root/t/t3701-add-interactive.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-09-19 00:58:04 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-09-19 00:58:04 (GMT)
commit694e517778243256b748819cc60eff6011238a0a (patch)
tree4692698c62330278df6d55a94fa1bc33044eb667 /t/t3701-add-interactive.sh
parent3ad8d3e4f9855de6444b081e59328a55de1def80 (diff)
parent1c6ffb546bf5d31c2cef2fefc86317658fda59e0 (diff)
downloadgit-694e517778243256b748819cc60eff6011238a0a.zip
git-694e517778243256b748819cc60eff6011238a0a.tar.gz
git-694e517778243256b748819cc60eff6011238a0a.tar.bz2
Merge branch 'jk/add-i-fixes'
"add -i/-p" fixes. * jk/add-i-fixes: add--interactive.perl: specify --no-color explicitly add-patch: fix inverted return code of repo_read_index()
Diffstat (limited to 't/t3701-add-interactive.sh')
-rwxr-xr-xt/t3701-add-interactive.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh
index fb73a84..1590cf6 100755
--- a/t/t3701-add-interactive.sh
+++ b/t/t3701-add-interactive.sh
@@ -569,12 +569,20 @@ test_expect_success 'patch mode ignores unmerged entries' '
diff_cmp expected diff
'
+test_expect_success 'index is refreshed after applying patch' '
+ git reset --hard &&
+ echo content >test &&
+ printf y | git add -p &&
+ git diff-files --exit-code
+'
+
test_expect_success 'diffs can be colorized' '
git reset --hard &&
echo content >test &&
printf y >y &&
force_color git add -p >output 2>&1 <y &&
+ git diff-files --exit-code &&
# We do not want to depend on the exact coloring scheme
# git uses for diffs, so just check that we saw some kind of color.