forum/usability: creating an archive on a new external drivegit-annexhttp://git-annex.branchable.com/forum/usability__58___creating_an_archive_on_a_new_external_drive/git-annexikiwiki2017-02-17T19:44:11Zcomment 1http://git-annex.branchable.com/forum/usability__58___creating_an_archive_on_a_new_external_drive/comment_1_27b5283c65c402f330263426e4ca6ac1/joeyh.name2016-03-12T16:58:09Z2014-09-16T18:07:54Z
<p>I started to make this change, and then I realized this problem: If a non-bare repository is made on an external drive, then to the user this is another place they can edit their files. Which means they will expect their changes made there to be committed. Which is highly problematic, because the assistant cannot be left running on an external drive or it won't be able to be unmounted. Or, a periodic <code>git annex add; git annex sync</code> could be run on the external drive, but that is a more expensive process (especially when run on a slow drive) and would not meet the expectations of users of the assistant that their changes will promptly propagate.</p>
<p>So, I feel that leaving bare repositories is actually the best choice.</p>
comment 2http://git-annex.branchable.com/forum/usability__58___creating_an_archive_on_a_new_external_drive/comment_2_b3a6b5ff0aaddd78903fc7bc7fbd6ee2/anarcat [id.koumbit.net]2016-03-12T16:58:09Z2014-09-16T20:35:23Z
<p>i wouldn't expect those changes to be committed. it's an external drive, and unless i manually sync it, it should take into account my changes.</p>
<p>i am more surprised by the bare repository than i would be surprised by my changes not propagating back, i think. --<a href="http://git-annex.branchable.com/users/anarcat/">anarcat</a></p>
comment 3http://git-annex.branchable.com/forum/usability__58___creating_an_archive_on_a_new_external_drive/comment_3_aab934c0e37771d7f834d2567a9e76a1/joeyh.name2016-03-12T16:58:09Z2014-11-25T21:26:44Z
<p>Of course you wouldn't expect that, I've explained the problem to you and you're technically adept and know about issues with keeping open files on removable drives.</p>
<p>However, I have to consider the affordances of what the assistant sets up, and the natural affordance of a drive containing a directory with your files in it is to be able edit those files. And when changes in every other clone of that directory get automatically synced, the expectation would be for the same to hold true on this directory on the removable drive.</p>
<p>I can see perhaps having the assistant run <code>git annex merge</code> in a removable repo after pushing to it (but <code>git annex sync</code> should not do that; violates least surprise for a git pull+merge+push wrapper like that to affect the work trees of other repos). As long as the assistant defaults to making removable repos bare, it won't expose normal users to the problem, and only advanced users who know how to set up non-bare repos.</p>
<p>If this is only for advanced users though, it (both assistant and <code>git annex sync</code>) could just as well run a configurable command on a removable repo after pushing to it. Or, the advanced user could use their skillz to make the removable drive be formatted with a reasonable filesystem that allows executable files, and then set up a git post-receive hook.</p>
comment 4http://git-annex.branchable.com/forum/usability__58___creating_an_archive_on_a_new_external_drive/comment_4_42beace277e009ddff449cb220775d44/joey2017-02-17T19:44:11Z2017-02-17T19:38:45Z
<p>It's now pretty easy to set up a remote on a USB drive so that <code>git annex
sync</code> will update the work tree. See
<a href="https://git-annex.branchable.com/tips/making_a_remote_repo_update_when_changes_are_pushed_to_it/">https://git-annex.branchable.com/tips/making_a_remote_repo_update_when_changes_are_pushed_to_it/</a></p>
<p>However, the assistant does not do this by default when adding repos on USB
drives, due to the likely confusion that setting up such a repo would
cause, as described in my previous comment.</p>