diff options
author | Joey Hess <joey@kitenet.net> | 2011-10-03 22:24:57 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-10-03 23:29:48 -0400 |
commit | 8ef2095fa00408ce6729596a42bc0abdc7778098 (patch) | |
tree | d6fc3c9f9519ba2ce617a804ce1c5f33f59a9109 /UUID.hs | |
parent | 003a604a6e48a8a0ffd1564e3399b54e8c673e92 (diff) |
factor out common imports
no code changes
Diffstat (limited to 'UUID.hs')
-rw-r--r-- | UUID.hs | 12 |
1 files changed, 3 insertions, 9 deletions
@@ -22,18 +22,12 @@ module UUID ( uuidLog ) where -import Control.Monad.State -import Control.Applicative -import System.Cmd.Utils -import System.IO import qualified Data.Map as M -import Data.Maybe +import AnnexCommon import qualified Git import qualified Branch -import Types import Types.UUID -import qualified Annex import qualified Build.SysConfig as SysConfig import Config @@ -60,7 +54,7 @@ genUUID = liftIO $ pOpen ReadFromPipe command params $ \h -> hGetLine h -} getUUID :: Git.Repo -> Annex UUID getUUID r = do - g <- Annex.gitRepo + g <- gitRepo let c = cached g let u = getUncachedUUID r @@ -81,7 +75,7 @@ getUncachedUUID r = Git.configGet r configkey "" {- Make sure that the repo has an annex.uuid setting. -} prepUUID :: Annex () prepUUID = do - u <- getUUID =<< Annex.gitRepo + u <- getUUID =<< gitRepo when ("" == u) $ do uuid <- liftIO genUUID setConfig configkey uuid |