summaryrefslogtreecommitdiff
path: root/Init.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-11-30 16:12:20 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-11-30 16:12:20 -0400
commit2125458db2ae85357eb7bf0439c549b30ce5ef9c (patch)
treea18d8719701e8b1b98eafd464e3f0cfbc93860e3 /Init.hs
parentd9d07ca0efce0ebf619821f58cdc7572b87b21cd (diff)
init: Fix a bug that caused git annex init, when run in a bare repository, to set core.bare=false.
Diffstat (limited to 'Init.hs')
-rw-r--r--Init.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Init.hs b/Init.hs
index ad1803995..76f8d236e 100644
--- a/Init.hs
+++ b/Init.hs
@@ -65,7 +65,10 @@ initialize mdescription = do
setVersion directModeVersion
, do
setVersion defaultVersion
- setDirect False
+ -- Handle case where this repo was cloned from a
+ -- direct mode repo.
+ unlessM isBare
+ switchHEADBack
)
createInodeSentinalFile
u <- getUUID