git-annex/doc/git-annex-dropunused.mdwn
Joey Hess 1a9af823bc
addunused, dropunused: Support --json and --json-error-messages
This also changes addunused to display the names of the files that it adds.
That seems like a general usability improvement, and not displaying the input
number does not seem likely to be a problem to a user, since the filename
is based on the key. Displaying the filename was necessary to get it and the key
included in the json.

dropunused does not include the key in the json. It would be possible to
add, but would need more changes. And I doubt that dropunused --json
would be used in a situation where a program cared which keys were
dropped. Note that drop --unused does have the key in its json, so such
a program could just use it. Or could just dropkey --batch with the
specific keys it wants to drop if it cares about specific keys.

Sponsored-By: the NIH-funded NICEMAN (ReproNim TR&D3) project
2023-05-05 14:01:40 -04:00

57 lines
1.2 KiB
Markdown

# NAME
git-annex dropunused - drop unused file content
# SYNOPSIS
git annex dropunused `[number|range ...]`
# DESCRIPTION
Drops the data corresponding to the numbers, as listed by the last
`git annex unused`
You can also specify ranges of numbers, such as "1-1000".
Or, specify "all" to drop all unused data.
# OPTIONS
* `--from=remote`
Rather than dropping the unused files from the local repository,
drop them from the remote repository.
* `--force`
Use this option with care! It bypasses safety checks, and forces
git-annex to delete the content of the specified files, even from
the last repository that is storing their content. Data loss can
result from using this option.
* `--json`
Enable JSON output. This is intended to be parsed by programs that use
git-annex. Each line of output is a JSON object.
* `--json-error-messages`
Messages that would normally be output to standard error are included in
the JSON instead.
* Also the [[git-annex-common-options]](1) can be used.
# SEE ALSO
[[git-annex]](1)
[[git-annex-unused]](1)
[[git-annex-drop]](1)
[[git-annex-copy]](1)
# AUTHOR
Joey Hess <id@joeyh.name>
Warning: Automatically converted into a man page by mdwn2man. Edit with care.