diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-06-02 16:59:15 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-06-02 16:59:47 -0400 |
commit | ed9cdb350e0bae8523b9d60cd414730c7d515829 (patch) | |
tree | 34a4da75125165dc6cd992c68decccec7f74bc1f /Annex | |
parent | bfc9f0cb3094da50c6d6e22242978513bee8a622 (diff) |
refactor isBareRepo
Diffstat (limited to 'Annex')
-rw-r--r-- | Annex/Init.hs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Annex/Init.hs b/Annex/Init.hs index f2996993a..e12a8bc80 100644 --- a/Annex/Init.hs +++ b/Annex/Init.hs @@ -85,7 +85,7 @@ initialize' mversion = do checkLockSupport checkFifoSupport checkCrippledFileSystem - unlessM isBare $ + unlessM isBareRepo $ hookWrite preCommitHook setDifferences unlessM (isJust <$> getVersion) $ @@ -98,7 +98,7 @@ initialize' mversion = do NeedUpgradeForAdjustedClone -> void $ upgrade True InAdjustedClone -> return () NotInAdjustedClone -> - ifM (crippledFileSystem <&&> (not <$> isBare)) + ifM (crippledFileSystem <&&> (not <$> isBareRepo)) ( ifM versionSupportsUnlockedPointers ( adjustToCrippledFileSystem , do @@ -107,7 +107,7 @@ initialize' mversion = do ) -- Handle case where this repo was cloned from a -- direct mode repo - , unlessM isBare + , unlessM isBareRepo switchHEADBack ) createInodeSentinalFile False @@ -137,9 +137,6 @@ ensureInitialized = getVersion >>= maybe needsinit checkUpgrade isInitialized :: Annex Bool isInitialized = maybe Annex.Branch.hasSibling (const $ return True) =<< getVersion -isBare :: Annex Bool -isBare = fromRepo Git.repoIsLocalBare - {- A crippled filesystem is one that does not allow making symlinks, - or removing write access from files. -} probeCrippledFileSystem :: Annex Bool |