3 subject="""comment 4"""
4 date="2019-12-27T18:41:12Z"
6 It's almost possible to get the same unwanted conversion without any git
9 echo content-git > file-git
15 echo content-annex > file-annex
16 git -c annex.largefiles=anything annex add file-annex
18 In this case, git currently does not run the modified file-git through the
19 clean filter in the last line, so the annex.largefiles=anything doesn't
22 But, as far as I can see, there's nothing preventing a future version
23 of git from deciding it does want to run file-git through the clean filter
26 I am not going to try to prevent against such a thing happening.
27 As far as I can see, anything that the clean filter can possibly do to
28 avoid such a situation will cripple existing uses cases of
29 annex.largefiles, like largerthan() as mentioned above.
30 The user has told git-annex to annex "anything", and if git
31 decides to run the clean filter while that is in effect, caveat emptor.
33 Which is not to say I'm not going to fix the specific case this bug was
34 filed about. I actually have a fix developed now. But just to say that
35 setting annex.largefiles=anything/nothing temporarily is a blunt instrument,
36 and you risk accidental conversion when using it, and so it would be a good
39 One idea: Make `git-annex add --annex` and `git-annex add --git`
40 add a specific file to annex or git, bypassing annex.largefiles and all
41 other configuration and state. This could also be used to easily switch
42 a file from one storage to the other. I'd hope the existence of that
43 would prevent one-off setting of annex.largefiles=anything/nothing.
44 [[todo/git_annex_add_option_to_control_to_where]]