Message ID | c4ada0b787736ecd5aee986b1b8a4f90ccb84e21.1729631436.git.code@khaugsbakk.name (mailing list archive) |
---|---|
State | Accepted |
Commit | 0fcd473fdd3f8d2c418a4fafcbee2a523bd610cb |
Headers | show |
Series | [v3] t7001: add failure test which triggers assertion | expand |
On Tue, Oct 22, 2024 at 11:14:33PM +0200, kristofferhaugsbakk@fastmail.com wrote: > Notes (series): > v3: > • Rewrite commit message based on Junio’s reply > • Tweak test description: less volatile. Also mention index state. > v1/v2: > • It’s been a good while. Let’s just add this as a known breakage? Thanks, this the new version looks good to me. Let's start merging this one down. Thanks, Taylor
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