forum/"git add" vs "git annex add" in v6git-annexhttp://git-annex.branchable.com/forum/__34__git_add__34___vs___34__git_annex_add__34___in_v6/git-annexikiwiki2018-04-27T16:39:49Zcomment 1http://git-annex.branchable.com/forum/__34__git_add__34___vs___34__git_annex_add__34___in_v6/comment_1_285032a01ca754c539ce0634823db23c/joey2016-09-21T22:03:16Z2016-09-21T20:25:10Z
<p>This is a documented behavior change in v6 mode. I'm willing to listen to
arguments that the behavior change is a bad idea, but see below.</p>
<p>To get the old behavior, you can use:</p>
<pre><code>git -c 'annex.largefiles=exclude=*' add
</code></pre>
<p>Unfortunately git won't let you alias git add to always pass that
switch. But you could alias <code>git sadd</code> or something to use that switch.</p>
<hr />
<p>The same behavior change also makes <code>git commit -a</code> use git-annex when file
contents have changed, rather than the old hacky method which added the
files to git and then undid that in a pre-commit hook. So there's quite a
nice benefit there.</p>
<p>And for that reason it doesn't make sense to add a configuration option to
disable it, because such an option would break <code>git commit -a</code> of
modified annexed files.</p>
<p>Changing the gitattributes won't work because then the v6 repository won't
get annexed files checked out properly.</p>
comment 2http://git-annex.branchable.com/forum/__34__git_add__34___vs___34__git_annex_add__34___in_v6/comment_2_93eec60060bc7bca8dd1633b670f9a53/spwhitton2018-04-27T16:39:49Z2018-04-27T16:39:49Z
Is the <code>git annex -a</code> benefit one of performance? I.e. the reason why the pre-commit hook approach was less good was that could be slower?