assistant: Fix bug, introduced in last release, that caused the assistant to make many unncessary empty merge commits.

This commit is contained in:
Joey Hess 2014-07-05 17:12:05 -04:00
parent 91688ae46e
commit 4a66cd3f91
4 changed files with 16 additions and 6 deletions

View file

@ -28,7 +28,11 @@ import qualified Data.Set as S
{- Merges from a branch into the current branch
- (which may not exist yet),
- with automatic merge conflict resolution. -}
- with automatic merge conflict resolution.
-
- Callers should use Git.Branch.changed first, to make sure that
- there are changed from the current branch to the branch being merged in.
-}
autoMergeFrom :: Git.Ref -> (Maybe Git.Ref) -> Git.Branch.CommitMode -> Annex Bool
autoMergeFrom branch currbranch commitmode = do
showOutput

View file

@ -79,11 +79,13 @@ onChange file
mergecurrent (Just current)
| equivBranches changedbranch current = do
debug
[ "merging", Git.fromRef changedbranch
, "into", Git.fromRef current
]
void $ liftAnnex $ autoMergeFrom changedbranch (Just current) Git.Branch.AutomaticCommit
void $ liftAnnex $ autoMergeFrom changedbranch (Just current) Git.Branch.AutomaticCommit
whenM (liftAnnex $ inRepo $ Git.Branch.changed current changedbranch) $ do
debug
[ "merging", Git.fromRef changedbranch
, "into", Git.fromRef current
]
void $ liftAnnex $ autoMergeFrom changedbranch (Just current) Git.Branch.AutomaticCommit
mergecurrent _ = noop
handleDesynced = case fromTaggedBranch changedbranch of

2
debian/changelog vendored
View file

@ -18,6 +18,8 @@ git-annex (5.20140614) UNRELEASED; urgency=medium
for git-annex branch commits and commits made by the assistant.
* Fix memory leak when committing millions of changes to the git-annex
branch, eg after git-annex add has run on 2 million files in one go.
* assistant: Fix bug, introduced in last release, that caused the assistant
to make many unncessary empty merge commits.
-- Joey Hess <joeyh@debian.org> Mon, 16 Jun 2014 11:28:42 -0400

View file

@ -14,3 +14,5 @@ Using the standalone build, 64bit, on ArchLinux, Fedora 20 and Ubuntu 14.04.
local repository version: 5
supported repository version: 5
upgrade supported from repository versions: 0 1 2 4
> [[fixed|done]] --[[Joey]]