fix build warning
authorJoey Hess <joeyh@joeyh.name>
Tue, 26 Mar 2024 18:13:59 +0000 (14:13 -0400)
committerJoey Hess <joeyh@joeyh.name>
Tue, 26 Mar 2024 18:13:59 +0000 (14:13 -0400)
A recent change made plumbing the backend through fsck unncessary.

Left fsck checking backend and skipping operating on key when it could
not find one. Not checking the backend would be a behavior change.
For example the command git-annex fsck --key FOO--bar does nothing
since FOO is not a known backend. If this were removed it would
instead go on and fsck it and warn that no copies exist of the key.
That behavior change seems like it would be fine, but I also have no
reason to make it.

Command/Fsck.hs

index c10cbe7cd3935749c6d143778499f249d73b3ea3..3e3de1ea863b6fc2fd2d44863dac2c5ff7deeb33 100644 (file)
@@ -216,7 +216,7 @@ startKey :: Maybe Remote -> Incremental -> (SeekInput, Key, ActionItem) -> NumCo
 startKey from inc (si, key, ai) numcopies =
        Backend.maybeLookupBackendVariety (fromKey keyVariety key) >>= \case
                Nothing -> stop
-               Just backend -> runFsck inc si ai key $
+               Just _ -> runFsck inc si ai key $
                        case from of
                                Nothing -> performKey key numcopies
                                Just r -> performRemote key (AssociatedFile Nothing) numcopies r