avoid unnecessary stats when traversing to parent
This commit is contained in:
parent
92a4af8b20
commit
8c87293b48
1 changed files with 5 additions and 3 deletions
|
@ -244,9 +244,11 @@ isRepoTop dir = do
|
|||
else isBareRepo
|
||||
where
|
||||
isRepo = gitSignature (".git" </> "config")
|
||||
isBareRepo = (&&)
|
||||
<$> doesDirectoryExist (dir </> "objects")
|
||||
<*> gitSignature "config"
|
||||
isBareRepo = do
|
||||
e <- doesDirectoryExist (dir </> "objects")
|
||||
if not e
|
||||
then return e
|
||||
else gitSignature "config"
|
||||
gitSignature file = doesFileExist (dir </> file)
|
||||
|
||||
newFrom :: RepoLocation -> IO Repo
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue