From: lh Date: Wed, 13 Apr 2022 23:56:09 +0000 (+0000) Subject: Added a comment: recording state in git X-Git-Tag: archive/raspbian/10.20250416-2+rpi1~1^2~75^2~62 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=252dc454e24c39f460df5aa7aeb86c2188196294;p=git-annex.git Added a comment: recording state in git --- diff --git a/doc/git-annex-add/comment_6_be9e67994aacebedb478f68a8ae542a5._comment b/doc/git-annex-add/comment_6_be9e67994aacebedb478f68a8ae542a5._comment new file mode 100644 index 0000000000..ba93f9a273 --- /dev/null +++ b/doc/git-annex-add/comment_6_be9e67994aacebedb478f68a8ae542a5._comment @@ -0,0 +1,14 @@ +[[!comment format=mdwn + username="lh" + avatar="http://cdn.libravatar.org/avatar/d31bade008d7da493d9bfb37d68fd825" + subject="recording state in git" + date="2022-04-13T23:56:09Z" + content=""" +Why does git-annex-add record state in Git? This means if you change your mind before committing and unannex some files, those files are still left in the annex. Semantically, this makes git-annex-add feel more like a commit operation, which is confusing given the name. + +Furthermore, to forcibly drop these files, you have to take the output `git annex whereused --unused --historical` and compare it against the output of `git annex unused` to get a list of files that don't show up anywhere in the history. This is rather cumbersome for dropping files you never committed. + +Couldn't the `git-annex` branch use the index, like git itself, so unannexing wouldn't leave you with extraneous files? + +I get the safety perspective, but I feel like that's what `git commit` (and a hypothetical `git annex commit`) should be for. The staging area is useful to verify you're actually committing what you want. I know I'm probably a decade late here, but I'd be interested to hear your thoughts, anyway. It seems weird to deviate from git here. +"""]]