get rid of racy addLink
authorJoey Hess <joeyh@joeyh.name>
Tue, 14 Jun 2022 18:40:55 +0000 (14:40 -0400)
committerJoey Hess <joeyh@joeyh.name>
Tue, 14 Jun 2022 18:47:15 +0000 (14:47 -0400)
commit78a3d44ea0a3a32699ddd7b2b5cb7cf2c5150ce7
tree8d777599819b148ebd5ffc675b2967eb332812cc
parent7ace804d8e287432c4c77f27e2a792bad0b90cd5
get rid of racy addLink

The remaining callers all did not rely on it checking gitignore, so were
easy to convert.

They were susceptable to the same overwrite race as add and fix,
although less likely to have it and a narrower window than add's race.

Command.Rekey in passing got an unncessary call to removeFile deleted.
addSymlink handles deleting any existing worktree file.
Annex/Ingest.hs
CHANGELOG
Command/AddUnused.hs
Command/AddUrl.hs
Command/Lock.hs
Command/ReKey.hs
doc/bugs/add_overwrite_race.mdwn