git-annex/doc/git-annex-oldkeys.mdwn
Joey Hess cf8b30c914
oldkeys: New command that lists the keys used by old versions of a file
The tricky thing about this turned out to be handling renames and reverts.
For that, it has to make two passes over the git log, and to avoid
buffering a possibly huge amount of logs in memory (ie the whole git log of
an entire repository!), runs git log twice.

(It might be possible to speed this up by asking git log to show a diff,
and so avoid needing to use catKey.)

Sponsored-By: Brock Spratlen on Patreon
2023-08-22 14:51:06 -04:00

38 lines
791 B
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 the most recent
key used by deleted files (but not by renamed files).
Note that the listed keys may still be used by other files in the
repository.
# OPTIONS
* 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.