summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2024-11-01 17:53:20 +0100
committerTaylor Blau <me@ttaylorr.com>2024-11-01 17:53:21 +0100
commit07c6066f82ff23efccf2a099e3ef5662d8f62c5d (patch)
treee661647a2de70ca11d9ea3c3368ed617ec66f907 /t
parentMerge branch 'rj/cygwin-exit' (diff)
parentt7001: add failure test which triggers assertion (diff)
downloadgit-07c6066f82ff23efccf2a099e3ef5662d8f62c5d.tar.xz
git-07c6066f82ff23efccf2a099e3ef5662d8f62c5d.zip
Merge branch 'kh/mv-breakage'
Demonstrate an assertion failure in 'git mv'. * kh/mv-breakage: t7001: add failure test which triggers assertion
Diffstat (limited to 't')
-rwxr-xr-xt/t7001-mv.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 86258f9f43..69c9190772 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -551,4 +551,16 @@ test_expect_success 'moving nested submodules' '
git status
'
+test_expect_failure 'nonsense mv triggers assertion failure and partially updated index' '
+ test_when_finished git reset --hard HEAD &&
+ git reset --hard HEAD &&
+ mkdir -p a &&
+ mkdir -p b &&
+ >a/a.txt &&
+ git add a/a.txt &&
+ test_must_fail git mv a/a.txt a b &&
+ git status --porcelain >actual &&
+ grep "^A[ ]*a/a.txt$" actual
+'
+
test_done