unused, status: Avoid crashing when ran in bare repo.
This commit is contained in:
parent
39c2f1ed04
commit
b885c0c6c8
2 changed files with 7 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue