{- git-annex assistant git merge thread
-
- - Copyright 2012-2017 Joey Hess <id@joeyh.name>
+ - Copyright 2012-2021 Joey Hess <id@joeyh.name>
-
- Licensed under the GNU AGPL version 3 or higher.
-}
import Utility.DirWatcher.Types
import Utility.Directory.Create
import Annex.CurrentBranch
+import Assistant.Commits
import qualified Annex
import qualified Annex.Branch
import qualified Git
mergecurrent =
mergecurrent' =<< liftAnnex getCurrentBranch
mergecurrent' currbranch@(Just b, _)
- | changedbranch `isRelatedTo` b =
+ | changedbranch `isRelatedTo` b = do
whenM (liftAnnex $ inRepo $ Git.Branch.changed b changedbranch) $ do
debug
[ "merging", Git.fromRef changedbranch
def
cmode
changedbranch
+ recordCommit
+ | changedbranch == b =
+ -- Record commit so the pusher pushes it out.
+ -- This makes sure pushes happen when
+ -- annex.autocommit=false
+ recordCommit
mergecurrent' _ = noop
{- Is the first branch a synced branch or remote tracking branch related
or by git-annex numcopies or by --numcopies, since that
configuration would make git-annex easily lose data.
Same for mincopies.
+ * assistant: When annex.autocommit is set, notice commits that
+ the user makes manually, and push them out to remotes promptly.
-- Joey Hess <id@joeyh.name> Mon, 28 Mar 2022 14:46:10 -0400
--- /dev/null
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 7"""
+ date="2022-03-31T16:59:13Z"
+ content="""
+@Atemu would have been a good idea to file a bug about that.
+
+I think the assistant would probably eventually get around to pushing a
+commit that you made with annex.autocommit=false, but it did not promptly
+notice such commits and push them.
+
+I've made a small change that does make it promptly push commits that
+were made to the current branch.
+"""]]