adjusted branches need git 2.2.0 or newer

When git-annex is used with a git version older than 2.2.0, disable support for
adjusted branches, since GIT_COMMON_DIR is needed to update them and was first
added in that version of git.
This commit is contained in:
Joey Hess 2016-04-22 12:29:32 -04:00
parent a3465c6327
commit 0273cd5005
Failed to extract signature
5 changed files with 28 additions and 5 deletions

View file

@ -9,7 +9,6 @@ module Command.Adjust where
import Command
import Annex.AdjustedBranch
import Annex.Version
cmd :: Command
cmd = notBareRepo $ notDirect $ noDaemonRunning $
@ -34,8 +33,7 @@ seek = commandAction . start
start :: Adjustment -> CommandStart
start adj = do
unlessM versionSupportsAdjustedBranch $
error "Adjusted branches are only supported in v6 or newer repositories."
checkVersionSupported
showStart "adjust" ""
enterAdjustedBranch adj
next $ next $ return True