bug fix
really innefficient but it does solve dropping
This commit is contained in:
parent
557a6e11a6
commit
805af01562
2 changed files with 17 additions and 0 deletions
|
@ -44,6 +44,7 @@ import Annex.Common
|
|||
import Types.AdjustedBranch
|
||||
import Annex.AdjustedBranch.Name
|
||||
import qualified Annex
|
||||
import qualified Annex.Queue
|
||||
import Git
|
||||
import Git.Types
|
||||
import qualified Git.Branch
|
||||
|
@ -315,6 +316,11 @@ adjustedBranchRefresh _af a = do
|
|||
-- because other files than the provided AssociatedFile
|
||||
-- can need to be updated in some edge cases.
|
||||
update adj origbranch = do
|
||||
-- Flush the queue, to make any pending changes be written
|
||||
-- out to disk. But mostly so any pointer files
|
||||
-- restagePointerFile was called on get updated so git
|
||||
-- checkout won't fall over.
|
||||
Annex.Queue.flush
|
||||
let adjbranch = originalToAdjusted origbranch adj
|
||||
void $ updateAdjustedBranch adj adjbranch origbranch
|
||||
|
||||
|
|
|
@ -97,3 +97,14 @@ branch. That is not batched, so running once per file may get slow.
|
|||
And to write trees, it uses git mktree --batch. But, a new process is
|
||||
started each time by Git.Tree.adjustTree (and other things).
|
||||
Making that a long-running process would speed it up, probably.
|
||||
|
||||
## queue flush slowness
|
||||
|
||||
It uses Annex.Queue.flush to avoid a problem with dropping files,
|
||||
which depopuates the pointer file, which git sees as modified until
|
||||
restaged, which then prevents checking out the version of the branch where
|
||||
the pointer file is a symlink. There must be a less expensive way to handle
|
||||
that.
|
||||
|
||||
(All the extra "(recording state in git...)" when dropping
|
||||
are due to it doing that too.)
|
||||
|
|
Loading…
Reference in a new issue