This commit is contained in:
Joey Hess 2022-08-24 15:17:43 -04:00
parent b47ea090ca
commit 5e45befa1b
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 29 additions and 0 deletions

View file

@ -0,0 +1,11 @@
[[!comment format=mdwn
username="joey"
subject="""comment 7"""
date="2022-08-24T19:01:55Z"
content="""
I do think there is value in the simplicity of the current json, even if a
"better" one could be constructed if we did not need to worry about
backwards compatability. A new JSON object that was only seen when
recursing a directory would need to be documented, otherwise a JSON user
would be likely to only implement support for the JSON objects they did see.
"""]]

View file

@ -0,0 +1,18 @@
[[!comment format=mdwn
username="joey"
subject="""re: comment 5"""
date="2022-08-24T19:06:20Z"
content="""
git-annex uses git plumbing to handle this, so it's easy to do very close
to the same thing:
For most git-annex commands except `add`, you can get a list of files
with `git ls-files --cached`. That will include annexed files and other
files, but of course commands like `drop` will skip the non-annexed files
and that can be handled with the existing `--batch` interface.
For `add`, use `git ls-files --others --exclude-standard`
(For `add`, it also looks at `git ls-files --modified`, but you only need
that if you want to add files that got modified.)
"""]]