assistant does not support nonstandard --git-dirgit-annexhttp://git-annex.branchable.com/bugs/git_annex_wont_work_with_git-dir_and_work-tree/git-annexikiwiki2015-11-05T07:28:02Zcomment 1http://git-annex.branchable.com/bugs/git_annex_wont_work_with_git-dir_and_work-tree/comment_1_cc3ea43301cd17b55794f9b9dd1e91cf/joey2015-02-09T18:17:22Z2015-02-09T17:54:00Z
<p>I've confirmed this behavior. Normally git-annex propigates --git-dir
to git commands it runs, but this is not done in a few cases in the
assistant, including when it starts <code>git-annex remotedaemon</code> but also
<code>git-annex fsck</code>, <code>git annex unused</code>, and <code>git annex transferkeys</code>.</p>
<p>(Just search for readProgramFile; Remote.Git.fsckOnRemote is the only
place outside the assistant that uses it, and it does take care to
propigate --git-dir and --work-tree.)</p>
<p>Also, restarting the assistant, either in the web ui or automatically due to
an upgrade also doesn't propigate --git-dir.</p>
<p>And, the assistant's autostart file doesn't support --git-dir.</p>
<p>All of which could be fixed, but I have to wonder, why? What's the use case
for a separate --git-dir with the assistant? I guess not vcsh because the
assistant would watch for all changes to the home directory, and add them,
and that's not how vcsh is used.</p>
<p>I'm tempted to just make the assistant refuse to start when given a
nonstandard --git-dir..</p>
Why shoul git-annex support --git-dirhttp://git-annex.branchable.com/bugs/git_annex_wont_work_with_git-dir_and_work-tree/comment_2_fb75f5941d355947b3f06165825dd012/Gioacchino2015-03-01T10:10:31Z2015-03-01T10:10:31Z
<p>Hi!</p>
<p>There are multiple use case as I explained on IRC and it is why I and probably more users need it, there are some git-annex repository that i share also with other programs like RetroShare and apache USERDIR (like http://efesto.eigenlab.org/~gioacchino/) i don't like .git directory to be shared by these programs as the file are publics but not the metadata stored on the .git ( http://efesto.eigenlab.org/~gioacchino/.git/config ) i know i can do that with other tricks like htaccess but it is application specific hack while the real solution is to keep the .git in a private place</p>
<p>Another use case is when you are grepping or doing scripty stuff on your dir having the .git in another place allow you to do stuff without concern about what there is inside .git without using options like --exclude and similar</p>
<p>The list of use cases can grow as they are all the one caused git to support --git-dir so for the sake of consistence and for your donors please propagate --git-dir on all git-annex components <img src="http://git-annex.branchable.com/smileys/smile4.png" alt=";)" /></p>
<p>P.S. I am not native english speaker so sorry if something sounds bad</p>
comment 3http://git-annex.branchable.com/bugs/git_annex_wont_work_with_git-dir_and_work-tree/comment_3_8c7b21c8e500de719fc2909d0c9027e0/joey2015-07-06T19:54:46Z2015-07-06T19:47:47Z
<p>@Gioacchino, git-annex already fully supports --git-dir. It's only the
assistant that does not. If you're doing "scripty stuff", you are,
I'd guess, not using the assistant...</p>
comment 4http://git-annex.branchable.com/bugs/git_annex_wont_work_with_git-dir_and_work-tree/comment_4_423126c9884267b3466470d4ec7301ce/gmazzurco892015-11-05T07:28:02Z2015-11-05T07:28:02Z
<p>The "scripty stuff" may be a simple find or grep on the annexed dir, that doesn't actually involve git-annex, but those simple and usual commands are fooled by the content of .git, because of that it would be nice to have git-annex-{assistant, webapp, ...} work in this setup, it is not only a matter of scripts, other applications may have unexpected behavior in presence of .git -_-</p>
<p>To make the usage of other apps more complicated doesn't seems an objective of git-annex-webapp, am I wrong?</p>