git-annex/doc/git-annex-oldkeys.mdwn
Joey Hess 49b97b0675
oldkeys: check associated files by default and add --unchecked
Removed the prior code that checked for keys used by current versions of
the files being acted on. It is redundant with the associated files
check (so long as the associated files database is always up-to-date,
which reconcileStaged should accomplish).

Sponsored-by: Luke T. Shumaker on Patreon
2023-08-23 13:46:41 -04:00

54 lines
1.3 KiB
Markdown

# NAME
git-annex oldkeys - list keys used for old versions of files
# SYNOPSIS
git annex oldkeys `[path ...]`
# DESCRIPTION
Lists keys used for old versions of the specified files or directories.
The output from this command can be piped into a command like
`git-annex drop --batch-keys`
The keys are listed in order from newest to oldest.
When listing old keys for a directory, it will include keys used by deleted
files that were in that directory in past commits.
# OPTIONS
* --unchecked
By default this command does not list a key that is also used by any
file in the currently checked out branch. This option makes it also
list such keys.
The default behavior avoids surprises when dropping listed keys.
This option can be useful when eg copying all old versions of a file to a
remote.
* --revision-range=value
Only list old keys used in the specified range of revisions.
This works the same as the revision range option of `git log`.
See gitrevisions(7) for documentation about the format of this option.
For example, to list only keys used since the tag v1.0, use
`--revision-range=v1.0..HEAD`
* Also the [[git-annex-common-options]](1) can be used.
# SEE ALSO
[[git-annex]](1)
[[git-annex-unused]](1)
# AUTHOR
Joey Hess <id@joeyh.name>
Warning: Automatically converted into a man page by mdwn2man. Edit with care.