forum/Unlocked directory? Having all its new files unlockedgit-annexhttp://git-annex.branchable.com/forum/Unlocked_directory__63___Having_all_its_new_files_unlocked/git-annexikiwiki2021-09-06T19:52:14Zcomment 1http://git-annex.branchable.com/forum/Unlocked_directory__63___Having_all_its_new_files_unlocked/comment_1_cd08064d171bea606df1cb7dafbdd381/michalrus2017-08-16T11:03:03Z2017-08-16T11:03:03Z
So something along the lines of direct mode but <em>just for one</em> subdirectory.
comment 2http://git-annex.branchable.com/forum/Unlocked_directory__63___Having_all_its_new_files_unlocked/comment_2_6da3347c2d9243a9fe61fd75999d6f36/michalrus2017-08-16T12:47:48Z2017-08-16T12:47:48Z
<p>Whoa.</p>
<p>I just upgraded my repo to v6 (6.20170520), and it seems that a running assistant is adding every new file unlocked. :-o</p>
<p>How can I control which file will get added unlocked and which locked by the assistant?</p>
comment 3http://git-annex.branchable.com/forum/Unlocked_directory__63___Having_all_its_new_files_unlocked/comment_3_78dfedd93393709d3d7e417b779109d4/michalrus2017-08-16T12:58:24Z2017-08-16T12:58:24Z
<p>But it’s better. As a dirty workaround, I could add a cron job/timer that would periodically git-annex-lock all files <em>except</em> that single directory I want unlocked.</p>
<p>But a static configuration—say, in .gitattributes—would be way better. ♥</p>
<p>Or is there a way to configure that already?</p>
comment 4http://git-annex.branchable.com/forum/Unlocked_directory__63___Having_all_its_new_files_unlocked/comment_4_bdd6cb9cdf2366e5d930c0cdd80b3984/joey2017-08-17T15:58:51Z2017-08-17T15:56:25Z
<p>There's the annex.addunlocked setting which controls this in v6
repositories, but it's currently limited to true/false, can't configure
different behavior in different directories.</p>
<p>I'd probably need a motivating example to make it configurable in
.gitattributes. Having a hard time currently understanding how that would
be useful.</p>
comment 5http://git-annex.branchable.com/forum/Unlocked_directory__63___Having_all_its_new_files_unlocked/comment_5_7a2109bbe16de4c05db48763d00bfaf1/michalrus2017-08-17T17:53:24Z2017-08-17T17:53:24Z
<p>My particular example is that I’m using git-annex:</p>
<p>• mostly as an archive (esp. in family files context),</p>
<p>• but also as a sort-of FLOSS Dropbox for some specific files, that we’re editing.</p>
<p>I’d like to prevent easy (accidental, really) editing of those archived files.</p>
<p>Does this make sense?</p>
<p>Thank you!</p>
i would like to have this feature revisted, collaberative wiki editinghttp://git-annex.branchable.com/forum/Unlocked_directory__63___Having_all_its_new_files_unlocked/comment_6_9ed97ec6e540f2b795bf5bc11fcfdc90/jenkin.schibel2021-08-26T15:20:27Z2021-08-26T15:20:27Z
<p>i have recently found a use case for a feature like this.</p>
<p>My use case is that i have an annex that hosts and backs up all my familys files. most of these files are things like pictures. but some of these are also going to be files that my family and i are actively modifying (i.e a personal wiki) and whenever we add a new file to the wiki files, it would be nice to have the assistant automatically add and synchronize changes, but it always adds the new ones as locked files, so we have to go in and unlock them. So i think it would e useful to have a configuration where you give it a list of directories you where you would like git-annex to add the files and any files added to these directories are immediately unlocked I realize that we could probably just go with the workflow of adding these mostly text files to git instead of git-annex, but i like being able to backup these files to all of the "special" backup remotes that i have the other files synchronizing with.</p>
<p>hope this made sense</p>
comment 7http://git-annex.branchable.com/forum/Unlocked_directory__63___Having_all_its_new_files_unlocked/comment_7_c6f1dd606d2aa9aa473cdd3a6d92bd33/joey2021-09-06T19:52:14Z2021-09-06T19:50:02Z
<p>The annex.addunlocked config is able to do this, since version 7.20191230.
It can be set to a <a href="http://git-annex.branchable.com/git-annex-matching-expression/">git-annex-matching-expression</a>
eg "include=wiki/*" would make files in the top-level wiki directory always
be added unlocked, and other files would be added locked.
Matching on file extensions etc is also possible.</p>