annex.merge-annex-branches
Added annex.merge-annex-branches config setting which can be used to disable automatic merge of git-annex branches. I wonder if git-annex merge/sync/assistant should disable this setting? Not sure yet, so have not done so. May be that users will not set it in git config, but pass it via -c to commands that need it. Checking the config setting adds a very small overhead, but it's only checked once per command so should be insignificant. This commit was supported by the NSF-funded DataLad project.
This commit is contained in:
parent
addb91b24b
commit
09e73a3ab6
6 changed files with 59 additions and 6 deletions
|
@ -140,7 +140,13 @@ forceUpdate = updateTo =<< siblingBranches
|
|||
- Returns True if any refs were merged in, False otherwise.
|
||||
-}
|
||||
updateTo :: [(Git.Sha, Git.Branch)] -> Annex Bool
|
||||
updateTo pairs = do
|
||||
updateTo pairs = ifM (annexMergeAnnexBranches <$> Annex.getGitConfig)
|
||||
( updateTo' pairs
|
||||
, return False
|
||||
)
|
||||
|
||||
updateTo' :: [(Git.Sha, Git.Branch)] -> Annex Bool
|
||||
updateTo' pairs = do
|
||||
-- ensure branch exists, and get its current ref
|
||||
branchref <- getBranch
|
||||
dirty <- journalDirty
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue