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:
parent
a3465c6327
commit
0273cd5005
5 changed files with 28 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue