Bug#959506: git-annex: `git annex add` sometimes treats non-dotfiles in dotdirs as dotfiles

Marco Ricci m at the13thletter.info
Mon May 4 18:05:35 BST 2020


Thus wrote Joey Hess:
> Sean Whitton wrote:
>> So what you are suggesting is that git-annex should treat all files
>> within dotdirs as if they were themselves dotfiles?
>
> That is what git-annex actually does. Or rather, when asked to add
> ".$foo", it does not check to see if $foo might look like "dotdir/bar",
> it just sees it starts with a dot and so treats it as a dotfile.
>
> (One consequence of which is that if you cd to .dotdir and git annex add
> bar, it will not be treated as a dotfile. This could be considered a
> bug maybe.)

I argue that this is a bug, or at the very least a behavioral quirk that
isn't immediately obvious from reading the documentation. My personal
preference would be to *not* treat those as dotfiles, since they lack
the leading dot in the file basename, but whether you share my view on
that or not, it's the lack of documentation on this behavior that really
causes the trouble.

> Anyway, it is possible to configure git-annex to treat non-dotfiles
> within dotdirs as large files, while treating dotfiles as non-large:
>
> git config annex.dotfiles true
> git config annex.largefiles "(include=.*/* and exclude=.*/.*) or exclude=.*"
>
> (But .foo/.bar/baz will then be treated as a non-large file, it can't
> express an arbitrarily deep hierarchy of dotdirs.)

Not really what I'm looking for, given that I'm trying to use
git(-annex) to version my dotfiles in $HOME, and some of those files,
somewhere in the directory tree, have sensitive contents, and thus must
be manually moved to the annex. I wouldn't want to manage (or maintain)
a matching expression that covers all the sensitive files I have in
$HOME, past, present and future; it seems cleaner to me to disable the
automatic commit-to-other-system machinery and do a manual sweep for
sensitive files by hand each time I check in new data.

(And granted, I don't really see the rationale for special-casing
dotfiles (of whatever flavor) in the first place. But given my use
case above, I'm probably opinionated on that.)

Cheers,
Marco


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-haskell-maintainers/attachments/20200504/2e163fd3/attachment-0001.sig>


More information about the Pkg-haskell-maintainers mailing list