fix recent test suite reversion
git annex adjust --force will overwrite any current adjusted branch. I didn't document this because for the user, deleting the branch is just as good.
This commit is contained in:
parent
e394315b67
commit
80b86ff78d
2 changed files with 7 additions and 5 deletions
|
@ -191,7 +191,7 @@ enterAdjustedBranch adj = go =<< originalBranch
|
|||
where
|
||||
go (Just origbranch) = do
|
||||
let adjbranch = adjBranch $ originalToAdjusted origbranch adj
|
||||
ifM (inRepo $ Git.Ref.exists adjbranch)
|
||||
ifM (inRepo (Git.Ref.exists adjbranch) <&&> (not <$> Annex.getState Annex.force))
|
||||
( do
|
||||
mapM_ (warning . unwords)
|
||||
[ [ "adjusted branch"
|
||||
|
|
10
Test.hs
10
Test.hs
|
@ -1062,10 +1062,12 @@ test_conflict_resolution_adjusted_branch = whenM Annex.AdjustedBranch.isGitVersi
|
|||
writeFile conflictor "conflictor2"
|
||||
add_annex conflictor @? "add conflicter failed"
|
||||
git_annex "sync" [] @? "sync failed in r2"
|
||||
unlessM (annexeval Config.isDirect) $ do
|
||||
-- need v6 to use adjust
|
||||
git_annex "upgrade" [] @? "upgrade failed"
|
||||
git_annex "adjust" ["--unlock"] @? "adjust failed"
|
||||
-- need v6 to use adjust
|
||||
git_annex "upgrade" [] @? "upgrade failed"
|
||||
-- We might be in an adjusted branch
|
||||
-- already, when eg on a crippled
|
||||
-- filesystem. So, --force it.
|
||||
git_annex "adjust" ["--unlock", "--force"] @? "adjust failed"
|
||||
pair r1 r2
|
||||
forM_ [r1,r2,r1] $ \r -> indir r $
|
||||
git_annex "sync" [] @? "sync failed"
|
||||
|
|
Loading…
Add table
Reference in a new issue