drop: Add --batch and --json options.

This commit is contained in:
Joey Hess 2016-07-06 11:54:46 -04:00
parent a0d6ec1c8a
commit 5171e98988
Failed to extract signature
5 changed files with 28 additions and 6 deletions

View file

@ -61,6 +61,16 @@ safe to do so.
when git-annex has to contact remotes to check if it can drop files.
For example: `-J4`
* `--batch`
Enables batch mode, in which lines containing names of files to drop
are read from stdin.
* `--json`
Enable JSON output. This is intended to be parsed by programs that use
git-annex. Each line of output is a JSON object.
# SEE ALSO
[[git-annex]](1)

View file

@ -1,3 +1,6 @@
in the spirit of [[todo/--batch_for_add/]], [[todo/--batch_for_info/]], [[todo/--batch_for_find/]] and [[todo/--batch_for_whereis/]], why not add `--batch` to get/drop/import operations?
I am writing a script to get a bunch of arbitrary files and i want to avoid the overhead of running git-annex multiple times. I know i can use `annex.alwayscommit=false` but that is rather counter-intuitive as well. --[[anarcat]]
> [[done]] for add and drop. (Not for import, but if someone requests it
> with a use case we'll see.) --[[Joey]]

View file

@ -1,3 +1,6 @@
There is a dropkey --batch, so I guess I could workaround but probably would be nice for consistency to have --batch mode for drop itself as well
[[!meta author=yoh]]
> [[done]]; went ahead and added drop --batch to be symmetric with get
> --batch. --[[Joey]]