handle overBranchFileContents with read-only unmerged git-annex branches
This makes --all error out in that situation. Which is better than ignoring information from the branches. To really handle the branches right, overBranchFileContents would need to both query all the branches and union merge file contents (or perhaps not provide any file content), as well as diffing between branches to find files that are only present in the unmerged branches. And also, it would need to handle transitions.. Sponsored-by: Dartmouth College's Datalad project
This commit is contained in:
parent
d9d0fe5fa4
commit
7f6b2ca49c
4 changed files with 35 additions and 7 deletions
|
@ -150,7 +150,9 @@ getCache opttemplate = ifM (Annex.getState Annex.force)
|
|||
{- Scan all url logs and metadata logs in the branch and find urls
|
||||
- and ItemIds that are already known. -}
|
||||
knownItems :: Annex ([URLString], [ItemId])
|
||||
knownItems = Annex.Branch.overBranchFileContents select (go [] [])
|
||||
knownItems = Annex.Branch.overBranchFileContents select (go [] []) >>= \case
|
||||
Just r -> return r
|
||||
Nothing -> giveup "This repository is read-only."
|
||||
where
|
||||
select f
|
||||
| isUrlLog f = Just ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue