fix reversion on skipping dead keys in --all/bare
Fix a reversion that made dead keys not be skipped when operating on all keys via --all or in a bare repo. (Introduced in version 8.20200720) Also, improved the documentation of git-annex-dead, it does not only apply to fsck --all. Also, made git-annex fsck, when run on a file whose key is dead, display that. Before, it displayed that only when run with --all, but with this fix, it skips dead keys with --all. But it can still be run on a file that uses a dead key, and displaying "This key is dead" explains to the user why it does not consider missing content for it to be a problem. Sponsored-by: k0ld on Patreon
This commit is contained in:
parent
b7f13181ad
commit
eefc026370
5 changed files with 24 additions and 4 deletions
|
@ -27,6 +27,7 @@ import CmdLine.GitAnnex.Options
|
|||
import CmdLine.Action
|
||||
import Logs
|
||||
import Logs.Unused
|
||||
import Logs.Location
|
||||
import Types.Transfer
|
||||
import Logs.Transfer
|
||||
import Types.Link
|
||||
|
@ -283,7 +284,8 @@ withKeyOptions' ko auto mkkeyaction fallbackaction worktreeitems = do
|
|||
let go reader = reader >>= \case
|
||||
Just (k, f, content) -> checktimelimit (discard reader) $ do
|
||||
maybe noop (Annex.Branch.precache f) content
|
||||
keyaction Nothing (SeekInput [], k, mkActionItem k)
|
||||
unlessM (checkDead k) $
|
||||
keyaction Nothing (SeekInput [], k, mkActionItem k)
|
||||
go reader
|
||||
Nothing -> return ()
|
||||
Annex.Branch.overBranchFileContents getk go >>= \case
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue