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
|
else isBareRepo
|
||||||
where
|
where
|
||||||
isRepo = gitSignature (".git" </> "config")
|
isRepo = gitSignature (".git" </> "config")
|
||||||
isBareRepo = (&&)
|
isBareRepo = do
|
||||||
<$> doesDirectoryExist (dir </> "objects")
|
e <- doesDirectoryExist (dir </> "objects")
|
||||||
<*> gitSignature "config"
|
if not e
|
||||||
|
then return e
|
||||||
|
else gitSignature "config"
|
||||||
gitSignature file = doesFileExist (dir </> file)
|
gitSignature file = doesFileExist (dir </> file)
|
||||||
|
|
||||||
newFrom :: RepoLocation -> IO Repo
|
newFrom :: RepoLocation -> IO Repo
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue