bugs/OSX: Pushed changes are autocommitedgit-annexhttp://git-annex.branchable.com/bugs/OSX__58___Pushed_changes_are_autocommited/git-annexikiwiki2022-07-22T23:47:19Zcomment 1http://git-annex.branchable.com/bugs/OSX__58___Pushed_changes_are_autocommited/comment_1_ff7fc340c34297beb913e8cba5af052b/Lukey2021-05-11T08:41:41Z2021-05-11T08:41:41Z
Do you have <code>receive.denyCurrentBranch</code> set to <code>warn</code> or <code>ignore</code> anywhere? I could imagine this may cause such problems.
comment 2http://git-annex.branchable.com/bugs/OSX__58___Pushed_changes_are_autocommited/comment_2_fb72d7dc7b56c6166c557aa03b951eb1/Lukey2021-05-11T10:28:12Z2021-05-11T10:28:12Z
<p>Like <a href="http://git-annex.branchable.com/bugs/git_annex_sync_remove_all_recently_added_files/">git annex sync remove all recently added files</a>, I can also reproduce this with <code>receive.denyCurrentBranch</code> set to <code>warn</code> or <code>ignore</code> and I get similar commit patters sometimes. I guess it's very racy.</p>
<p>So yeah, don't set that config.</p>
comment 3http://git-annex.branchable.com/bugs/OSX__58___Pushed_changes_are_autocommited/comment_3_8420ed892366eb78a874eec793eaa38d/joey2021-05-12T16:22:48Z2021-05-12T15:26:00Z
<p>I do not think you need to reach for receive.denyCurrentBranch
to explain this behavior. The assistant runs git merge itself,
and is watching for changes to the working tree at the same time.
So it can get notifications of changes, that are made by git merge,
and commit them.</p>
<p>The result is that basically, any change that gets made to the work tree
while the assistant is running, can end up being recorded in a git commit.
Which is normally what you want and expect. In this case the change is
a file being removed breifly before being replaced with a new version.
Whether that is a bug is debatable, but it might be a good idea for the
assistant to at least pause committing while it's running a git merge.</p>
<p>The fact that it's committing files with merge conflict markers in them
is certianly a bug. I do wonder if that might be due to annex.resolvemerge
being configured to false; normally the assistant does not merge in a way
that would result in merge conflict markers ever appearing in the working
tree.</p>
comment 4http://git-annex.branchable.com/bugs/OSX__58___Pushed_changes_are_autocommited/comment_4_5def2bf7430c4cba0c6ed154e75c967b/Atemu2021-05-16T11:37:25Z2021-05-16T11:37:25Z
<p>Neither of those options are set AFAICT.</p>
<p>The assistant not trying to commit anything while it's waiting for git to do something else sound like a good idea to me aswell. Shouldn't such behaviour at least be caught by a lockfile though?</p>
<p>Are you able to reproduce the assistant turining unlocked files into merge markers Joey?</p>
comment 5http://git-annex.branchable.com/bugs/OSX__58___Pushed_changes_are_autocommited/comment_5_72c7566677b4c2f212bddeca49262181/Atemu2021-07-16T22:47:44Z2021-07-16T22:47:44Z
<p>I just tested this again with 8.20210714 since the assistant got a few improvements but unfortunately this is still just as reproducible.</p>
<p>I also tried setting delayadd since that works with smallfiles properly now but all that does is delay the re-adding of the file it "deleted" in the commit before which still happens instantly.</p>
comment 6http://git-annex.branchable.com/bugs/OSX__58___Pushed_changes_are_autocommited/comment_6_13ad56d86b5bdbaaacdad5b31347551c/Atemu2022-07-22T23:47:19Z2022-07-22T23:47:19Z
<p>Sadly, this is still an issue on the current master (e1de941b2c7a881ec690d7abafdd1e8915cee9a6).</p>
<p>I tried using kqueue instead of FsEvents but that resulted in the same behaviour.</p>
<p>If anybody needs an OSX machine for testing, https://github.com/kholia/OSX-KVM works well.</p>