tweak
This commit is contained in:
parent
b7a4ff1c31
commit
9e763954ae
1 changed files with 4 additions and 6 deletions
10
Init.hs
10
Init.hs
|
@ -1,6 +1,6 @@
|
||||||
{- git-annex repository initialization
|
{- git-annex repository initialization
|
||||||
-
|
-
|
||||||
- Copyright 2010 Joey Hess <joey@kitenet.net>
|
- Copyright 2011 Joey Hess <joey@kitenet.net>
|
||||||
-
|
-
|
||||||
- Licensed under the GNU GPL version 3 or higher.
|
- Licensed under the GNU GPL version 3 or higher.
|
||||||
-}
|
-}
|
||||||
|
@ -43,11 +43,9 @@ uninitialize = do
|
||||||
to avoid git-annex accidentially being run in git
|
to avoid git-annex accidentially being run in git
|
||||||
repos that did not intend to use it. -}
|
repos that did not intend to use it. -}
|
||||||
ensureInitialized :: Annex ()
|
ensureInitialized :: Annex ()
|
||||||
ensureInitialized = do
|
ensureInitialized = getVersion >>= maybe needsinit checkVersion
|
||||||
v <- getVersion
|
where
|
||||||
case v of
|
needsinit = do
|
||||||
Just version -> checkVersion version
|
|
||||||
Nothing -> do
|
|
||||||
annexed <- Branch.hasSomeBranch
|
annexed <- Branch.hasSomeBranch
|
||||||
if annexed
|
if annexed
|
||||||
then initialize
|
then initialize
|
||||||
|
|
Loading…
Add table
Reference in a new issue