bugs/add: inconsistently treats files in dotdirs as dotfilesgit-annexhttp://git-annex.branchable.com/bugs/add__58___inconsistently_treats_files_in_dotdirs_as_dotfiles/git-annexikiwiki2022-04-15T12:05:19Zcomment 1http://git-annex.branchable.com/bugs/add__58___inconsistently_treats_files_in_dotdirs_as_dotfiles/comment_1_263bfea4cae5a612de1761b3c3fc32b8/joey2020-06-17T01:18:32Z2020-05-11T16:31:58Z
<p>I think it's quite likely that most people consider files in dotdirs to be
dotfiles, most of the time. (.git/index is clearly not a dotfile,
.git/config probably is) The exact semantics of it are vague enough that
it's probably better to not consider them when it comes to this bug report.</p>
<p>The actual bug is not about whether .foo/bar is a dotfile, but about
inconsistent behavior adding it.</p>
<p>Avoiding treating them as dotfiles, even if they're broadly understood as
such would resolve the inconsistency.</p>
<p>Otoh, the inconsistency only arises when run inside a dot directory,
which is probably a fairly rare thing to do.</p>
comment 2http://git-annex.branchable.com/bugs/add__58___inconsistently_treats_files_in_dotdirs_as_dotfiles/comment_2_6fbd20761f9388c04fa13b38af2354d9/joey2020-06-17T01:18:32Z2020-05-11T16:40:46Z
<p>I'm also reluctant to start another behavior change in this area, there has
been more than enough drama around dotfile handling recently.</p>
<p>At least the behavior change would only result in small files that users
want to store in git being annexed, rather than large files being
unexpectedly put in git.</p>
<p>It would also be possible for users to get back the current behavior if
desired by configuring annex.dotfiles and annex.largefiles.</p>
<p>Also as far as the priority of this goes, I think that the number of
dotdirs that contain files that get version controlled at all is probably
quite small, excluding version controlling of HOME.</p>
comment 3http://git-annex.branchable.com/bugs/add__58___inconsistently_treats_files_in_dotdirs_as_dotfiles/comment_3_e8636243a3c98b11e54b6fa8617f9e32/the13thletter2020-06-17T01:18:32Z2020-06-02T14:26:52Z
<p>OP here. Sorry for the radio silence.</p>
<blockquote><p>I think it's quite likely that most people consider files in dotdirs to be dotfiles, most of the time. (.git/index is clearly not a dotfile, .git/config probably is) <strong>The exact semantics of it are vague enough</strong> that it's probably better to not consider them when it comes to this bug report.</p>
<p>[...]</p>
<p>I'm also reluctant to start another behavior change in this area, there has been more than enough drama around dotfile handling recently.</p>
<p>[...]</p>
<p>It would also be possible for users to get back the current behavior if desired by configuring annex.dotfiles and annex.largefiles.</p></blockquote>
<p>(Emphasis mine.) Given the points above, which I agree with (1) or accept (2 and 3), I'm perfectly fine with documenting the current behavior as correct and leaving it at that. My confusion stems from the fact that when I see <code>.foo/bar</code>, I say “no dotfile, because the file is actually named ‘bar’”, and git-annex says “dotfile, because the pathname expression begins with a dot” (or something like that) instead. Stating the exact rules git-annex uses to classify dotfiles as such, ideally alongside the documentation for <code>annex.dotfiles</code> and <code>annex.largefiles</code>, would avoid this confusion.</p>
comment 4http://git-annex.branchable.com/bugs/add__58___inconsistently_treats_files_in_dotdirs_as_dotfiles/comment_4_27bf6cfce4f73a1d29a753e33c1e871a/lell2022-04-15T12:05:19Z2022-04-15T12:05:19Z
<blockquote><p>Also as far as the priority of this goes, I think that the number of dotdirs that
contain files that get version controlled at all is probably quite small, excluding
version controlling of HOME.</p></blockquote>
<p>I think this assessment changes with the advent of containers. I use git-annex to version-control a research computation which runs inside a container. The folder is mounted as the home directory in that container, so python modules, self-compiled software etc. go into .local, configuration of tools goes into .config, etc. All of these are not annexed but inflate the repository size and might lead to inadverent sharing of information. It makes git-annexes behaviour difficult to explain to others with this exception of dotfile handling. Why can't git-annex just handle the <code>.git</code> folder differently and for all others just annex or not as set in the largefile rules?</p>