summaryrefslogtreecommitdiff
path: root/Command/Unused.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Command/Unused.hs')
-rw-r--r--Command/Unused.hs9
1 files changed, 6 insertions, 3 deletions
diff --git a/Command/Unused.hs b/Command/Unused.hs
index b115eee83..09b4be5df 100644
--- a/Command/Unused.hs
+++ b/Command/Unused.hs
@@ -229,9 +229,12 @@ withKeysReferencedM a = withKeysReferenced' () calla
withKeysReferenced' :: v -> (Key -> v -> Annex v) -> Annex v
withKeysReferenced' initial a = go initial =<< files
where
- files = do
- top <- fromRepo Git.repoPath
- inRepo $ LsFiles.inRepo [top]
+ files = ifM isBareRepo
+ ( return []
+ , do
+ top <- fromRepo Git.repoPath
+ inRepo $ LsFiles.inRepo [top]
+ )
go v [] = return v
go v (f:fs) = do
x <- Backend.lookupFile f