Say I have a git annex repository with one regular remote. The status of both remotes is clean.
If I run git annex sync
in the main remote, it will not create any commits.
However, running sync alternatively in both remotes will keep creating regular and merge commits.
I wonder if it would be possible to avoid this behavior.
git annex info
areweb
andbittorrent
, but I believe that this is the default. Are these the culprit?The built in web and bittorrent special remotes are not at fault.
I don't know what is causing this, but am interested in finding out. I have not seen this behavior in a long time. Back when git-annex had direct mode, it did sometimes behave this way, IIRC, but that was a long time ago. What version of git-annex are you using?
It would be helpful if you could show an example of this happening, with details about what the commits look like and what the output is of
git-annex sync
when they are created.When I try this, it doesn't happen:
After making a change, it quickly settles down:
Making different changes in the two repositories at the same time similarly settles down quickly, after one merge commit.
Hi joey,
thanks for looking into this. I am using git-annex from Debian stable. No special configuration. The following complete log demonstrates what I mean. I only edited my real name and email address out from the git log.
I can't reproduce that behavior with either the current git-annex head, or with git-annex 8.20210223, running the same sequence of commands.
I think that you have git configured not to do fast-forward merges. If you compare your transcipt with mine (below), your has "Merge made by the 'recursive' strategy" where mine has a Fast-forward.
The fast-forwards cause there to be no remaining differences between the repos, while making a merge commit means there is always a remaining change. Presumably, git would behave the same if you were manually doing git pulls and pushes, rather than using git-annex sync.
Probably you have merge.ff set to false, or some similar configuration.