a325524454
Added a --json-exceptions option, which makes some exceptions be output in json. The distinction is that --json-error-messages is for messages relating to a particular ActionItem, while --json-exceptions is for messages that are not, eg ones for a file that does not exist. It's unfortunate that we need two switches with such a fine distinction between them, but I'm worried about maintaining backwards compatability in the json output, to avoid breaking anything that parses it, and this was the way to make sure I didn't. toplevelWarning is generally used for the latter kind of message. And the other calls to toplevelWarning could be converted to showException. The only possible gotcha is that if toplevelWarning is ever called after starting acting on a file, it will add to the --json-error-messages of the json displayed for that file and converting to showException would be a behavior change. That seems unlikely, but I didn't convery everything to avoid needing to satisfy myself it was not a concern. Sponsored-by: Dartmouth College's Datalad project
56 lines
1.3 KiB
Markdown
56 lines
1.3 KiB
Markdown
# NAME
|
|
|
|
git-annex dropkey - drops annexed content for specified keys
|
|
|
|
# SYNOPSIS
|
|
|
|
git annex dropkey `[key ...]`
|
|
|
|
# DESCRIPTION
|
|
|
|
This plumbing-level command drops the annexed data for the specified
|
|
keys from this repository.
|
|
|
|
This can be used to drop content for arbitrary keys, which do not need
|
|
to have a file in the git repository pointing at them.
|
|
|
|
Warning: This command does not check that enough other copies of the content
|
|
exist; using it can easily result in data loss.
|
|
|
|
# OPTIONS
|
|
|
|
* `--batch`
|
|
|
|
Enables batch mode, in which lines containing keys 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 corresponding to a key
|
|
being processed.
|
|
|
|
* `--json-error-messages`
|
|
|
|
Adds an "error-messages" field to the JSON that contains messages that
|
|
would normally be output to the standard error when processing a key.
|
|
|
|
* `--json-exceptions`
|
|
|
|
Output additional JSON objects for some exceptions that are not
|
|
associated with a particular key.
|
|
|
|
|
|
* Also the [[git-annex-common-options]](1) can be used.
|
|
|
|
# SEE ALSO
|
|
|
|
[[git-annex]](1)
|
|
|
|
[[git-annex-setkey]](1)
|
|
|
|
# AUTHOR
|
|
|
|
Joey Hess <id@joeyh.name>
|
|
|
|
Warning: Automatically converted into a man page by mdwn2man. Edit with care.
|