Merge branch 'kh/mv-breakage'

Demonstrate an assertion failure in 'git mv'.

* kh/mv-breakage:
  t7001: add failure test which triggers assertion
This commit is contained in:
Taylor Blau
2024-11-01 12:53:20 -04:00

View File

@@ -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