New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gitrepo: Direct files to git with annex.gitaddtoannex #5545
Conversation
Back when this test was added in ad0158c (BF(v7): gitrepo: Avoid adding files to annex, 2019-09-23), 'git add' in a v6+ repo would add a file to the annex unless annex.largefiles instructed otherwise. With git-annex 7.20191024, 'git add' doesn't add files to the annex _unless_ annex.largefiles is set. Configure annex.largefiles for the test repo so that this test remains an effective regression test for the GitRepo.add_() change in ad0158c.
As mentioned in d3c9c9e (BF: annexrepo: Use annex-add's --force-large when available, 2020-03-11), using `annex.largefiles={anything,nothing}` for one-off calls to send files into the annex or git is discouraged because it leads to issues like the one described in be12952 (TST: annexrepo: Ignore racy "is clean?" failure, 2020-01-02) and the related git-annex issue. Now that our minimum version is above 7.20191024, use annex.gitaddtoannex instead. https://git-annex.branchable.com/bugs/A_case_where_file_tracked_by_git_unexpectedly_becomes_annex_pointer_file/
Codecov Report
@@ Coverage Diff @@
## master #5545 +/- ##
==========================================
+ Coverage 88.52% 88.58% +0.06%
==========================================
Files 296 296
Lines 42467 42485 +18
==========================================
+ Hits 37592 37637 +45
+ Misses 4875 4848 -27
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Just to make sure I grasp situation correctly: with this change we will avoid possible race condition in git-annex, but we will change behavior of |
Thanks, @bpoldrack and @yarikoptic, for taking a look.
No change in behavior is intended. Both the old setting (
Right, it's a weird state to get into: an annex repo needs to be instantiated as a This original change came in ad0158c (BF(v7): gitrepo: Avoid adding files to annex, 2019-09-23), part of gh-3648. This issue was discovered when troubleshooting a crawler test failure, though it looks like it ended up not being the reason for it (or at least not the sole reason).
As mentioned above, this shouldn't change the behavior of The change in behavior noted in the PR description is about git-annex 7.20191024 changing its effect on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx for this change!
Update
GitRepo.add_
to useannex.gitaddtoannex
instead ofannex.largefiles
to direct files to Git. See the message of second commit for the background.Update the associated regression test for a change in git-annex's behavior.