fix reversion caused by earlier optimisation to git-annex branch reads
aeca7c2207
was predicated on the
assumption that updateTo would stage any journal files, but in one case
it did not actually do so. The test suite happened to expose the bug.
This commit is contained in:
parent
df587ff068
commit
eedd73b846
1 changed files with 7 additions and 4 deletions
|
@ -170,15 +170,18 @@ updateTo' pairs = do
|
|||
if null tomerge
|
||||
{- Even when no refs need to be merged, the index
|
||||
- may still be updated if the branch has gotten ahead
|
||||
- of the index. -}
|
||||
then do
|
||||
whenM (needUpdateIndex branchref) $ lockJournal $ \jl -> do
|
||||
- of the index, or just if the journal is dirty. -}
|
||||
then ifM (needUpdateIndex branchref)
|
||||
( lockJournal $ \jl -> do
|
||||
forceUpdateIndex jl branchref
|
||||
{- When there are journalled changes
|
||||
- as well as the branch being updated,
|
||||
- a commit needs to be done. -}
|
||||
when dirty $
|
||||
go branchref True [] jl
|
||||
go branchref dirty [] jl
|
||||
, when dirty $
|
||||
lockJournal $ go branchref dirty []
|
||||
)
|
||||
else lockJournal $ go branchref dirty tomerge
|
||||
return $ not $ null tomerge
|
||||
where
|
||||
|
|
Loading…
Reference in a new issue