diff options
author | 2012-07-31 16:19:24 -0400 | |
---|---|---|
committer | 2012-07-31 16:19:24 -0400 | |
commit | bcf5c81593f26a253b514224e3326defd6fa0a8d (patch) | |
tree | 70d65ead2eb53216200acd02b0f199da3c38cc61 /Init.hs | |
parent | c70496dc7f89f07e05bea0257b7d93986dd61d89 (diff) |
when run in uninitialized git repo, do firstrun
My $HOME is in git, let's make it work :)
Diffstat (limited to 'Init.hs')
-rw-r--r-- | Init.hs | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -7,6 +7,7 @@ module Init ( ensureInitialized, + isInitialized, initialize, uninitialize ) where @@ -45,6 +46,10 @@ ensureInitialized = getVersion >>= maybe needsinit checkVersion , error "First run: git-annex init" ) +{- Checks if a repository is initialized. Does not check version for ugrade. -} +isInitialized :: Annex Bool +isInitialized = maybe Annex.Branch.hasSibling (const $ return True) =<< getVersion + {- set up a git pre-commit hook, if one is not already present -} gitPreCommitHookWrite :: Annex () gitPreCommitHookWrite = unlessBare $ do |