Re: [BUG] mv: can trigger assertion failure with three parameters (builtin/mv.c:481)
- From
Kristoffer Haugsbakk <code@khaugsbakk.name>
- Date
- Feb 18, 2024, 12:42 UTC
- Message-ID
- <ce1b5ae24ed8356b9beed340fff61e96f7c1d549.1708259215.git.code@khaugsbakk.name>
- In-Reply-To
- <d1f739fe-b28e-451f-9e01-3d2e24a0fe0d@app.fastmail.com>
Here’s a failing test. This fails on top of `master` (3e0d3cd5c7 (Merge branch 'jx/dirstat-parseopt-help', 2024-02-15)).
Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
-- >8 --
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh index 879a6dce601..4f180903486 100755 --- a/t/t7001-mv.sh +++ b/t/t7001-mv.sh @@ -549,4 +549,16 @@ test_expect_success 'moving nested submodules' ' git status ' +test_expect_success '(TODO title) nonsense move' ' + 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