summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-06-02 17:02:38 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-06-02 17:02:38 -0400
commitb62a12ebf92039141e76b7b5f5276dacd0fcddd1 (patch)
tree11cf3fa40082c14914b81529e2dc7fca913b52a5
parented9cdb350e0bae8523b9d60cd414730c7d515829 (diff)
Fix initialization of a bare clone of a repo that has an adjusted branch checked out.
-rw-r--r--Annex/AdjustedBranch.hs6
-rw-r--r--CHANGELOG2
2 files changed, 7 insertions, 1 deletions
diff --git a/Annex/AdjustedBranch.hs b/Annex/AdjustedBranch.hs
index 67c36f399..30cefdec0 100644
--- a/Annex/AdjustedBranch.hs
+++ b/Annex/AdjustedBranch.hs
@@ -52,6 +52,7 @@ import Annex.Perms
import Annex.GitOverlay
import Utility.Tmp
import qualified Database.Keys
+import Config
import qualified Data.Map as M
@@ -551,7 +552,10 @@ data AdjustedClone = InAdjustedClone | NotInAdjustedClone | NeedUpgradeForAdjust
- current version is too old to support adjusted branches. Returns True
- when this is the case. -}
checkAdjustedClone :: Annex AdjustedClone
-checkAdjustedClone = go =<< inRepo Git.Branch.current
+checkAdjustedClone = ifM isBareRepo
+ ( return NotInAdjustedClone
+ , go =<< inRepo Git.Branch.current
+ )
where
go Nothing = return NotInAdjustedClone
go (Just currbranch) = case adjustedToOriginal currbranch of
diff --git a/CHANGELOG b/CHANGELOG
index 2b15293fd..c7568fced 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -13,6 +13,8 @@ git-annex (6.20160528) UNRELEASED; urgency=medium
when used with git 2.9, which has stopped doing this itself.
* Automatically enable v6 mode when initializing in a clone from a repo
that has an adjusted branch checked out.
+ * Fix initialization of a bare clone of a repo that has an adjusted
+ branch checked out.
* remotedaemon: Fixed support for notifications of changes to gcrypt
remotes, which was never tested and didn't quite work before.