fix git-annex add regression on deleted file

Fix a regression in 10.20220624 that caused git-annex add to crash when
there was an unstaged deletion.

Sponsored-by: Dartmouth College's Datalad project
This commit is contained in:
Joey Hess 2022-08-19 12:49:17 -04:00
parent 15c0cff2da
commit 94029995fa
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
5 changed files with 35 additions and 17 deletions

View file

@ -399,6 +399,8 @@ test_add_moved = intmpclonerepo $ do
createDirectory subdir
Utility.MoveFile.moveFile (toRawFilePath annexedfile) (toRawFilePath subfile)
git_annex "add" [subdir] "add of moved annexed file"
git "mv" [sha1annexedfile, sha1annexedfile ++ ".renamed"] "git mv"
git_annex "add" [] "add does not fail on deleted file after move"
where
subdir = "subdir"
subfile = subdir </> "file"