fix strange test failure
It was trying to git annex adjust when in a direct mode repo, and that of course fails. What I don't understand though, is how the test suite managed to work before, when it was clearly checking the wrong thing. Since the right way to fix it was obvious, I have not bisected. This work is supported by the NIH-funded NICEMAN (ReproNim TR&D3) project.
This commit is contained in:
parent
63cf3381f0
commit
94aa0e2f64
3 changed files with 13 additions and 8 deletions
|
@ -26,7 +26,7 @@ module Annex.AdjustedBranch (
|
|||
propigateAdjustedCommits,
|
||||
AdjustedClone(..),
|
||||
checkAdjustedClone,
|
||||
isGitVersionSupported,
|
||||
isSupported,
|
||||
checkVersionSupported,
|
||||
) where
|
||||
|
||||
|
@ -610,10 +610,8 @@ checkAdjustedClone = ifM isBareRepo
|
|||
, return NeedUpgradeForAdjustedClone
|
||||
)
|
||||
|
||||
-- git 2.2.0 needed for GIT_COMMON_DIR which is needed
|
||||
-- by updateAdjustedBranch to use withWorkTreeRelated.
|
||||
isGitVersionSupported :: IO Bool
|
||||
isGitVersionSupported = not <$> Git.Version.older "2.2.0"
|
||||
isSupported :: Annex Bool
|
||||
isSupported = versionSupportsAdjustedBranch <&&> liftIO isGitVersionSupported
|
||||
|
||||
checkVersionSupported :: Annex ()
|
||||
checkVersionSupported = do
|
||||
|
@ -621,3 +619,8 @@ checkVersionSupported = do
|
|||
giveup "Adjusted branches are only supported in v6 or newer repositories."
|
||||
unlessM (liftIO isGitVersionSupported) $
|
||||
giveup "Your version of git is too old; upgrade it to 2.2.0 or newer to use adjusted branches."
|
||||
|
||||
-- git 2.2.0 needed for GIT_COMMON_DIR which is needed
|
||||
-- by updateAdjustedBranch to use withWorkTreeRelated.
|
||||
isGitVersionSupported :: IO Bool
|
||||
isGitVersionSupported = not <$> Git.Version.older "2.2.0"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue