NAME
git-annex whereused - find what files use or used a key
SYNOPSIS
git annex whereused --key=keyname|--unused
DESCRIPTION
Finds what files use or used a key.
For each file in the working tree that uses a key, this outputs one line, starting with the key, then a space, and then the name of the file. When multiple files use the same key, they will all be listed. When nothing is found that uses the key, there will be no output.
The default is to find only files in the current working tree that use a
key. The --historical
option makes it also find past versions of files.
OPTIONS
--key=keyname
Operate on this key.
--unused
Operate on keys found by last run of git-annex unused.
Usually these keys won't be used by any files in the current working tree, or any tags or branches. Combining this option with
--historical
will find past uses of the keys.--historical
When no files in the current working tree use a key, this causes more work to be done, looking at past versions of the current branch, other branches, tags, and the reflog, to find somewhere that the key was used. It stops after finding one use of the key, and outputs a git rev that refers to where it was used, eg "HEAD@{40}:somefile"
SEE ALSO
git-annex(1)
AUTHOR
Joey Hess id@joeyh.name
Warning: Automatically converted into a man page by mdwn2man. Edit with care.
``console % git annex whereused --help Invalid argument
whereused'Usage: git-annex COMMAND git-annex - manage files with git, without checking their contents in
...
% git annex version git-annex version: 8.20210223 build flags: Assistant Webapp Pairing Inotify DBus DesktopNotify TorrentParser MagicMime Feeds Testsuite S3 WebDAV dependency versions: aws-0.22 bloomfilter-2.0.1.0 cryptonite-0.26 DAV-1.3.4 feed-1.3.0.1 ghc-8.8.4 http-client-0.6.4.1 persistent-sqlite-2.10.6.2 torrent-10000.1.1 uuid-1.3.13 yesod-1.6.1.0 key/value backends: SHA256E SHA256 SHA512E SHA512 SHA224E SHA224 SHA384E SHA384 SHA3_256E SHA3_256 SHA3_512E SHA3_512 SHA3_224E SHA3_224 SHA3_384E SHA3_384 SKEIN256E SKEIN256 SKEIN512E SKEIN512 BLAKE2B256E BLAKE2B256 BLAKE2B512E BLAKE2B512 BLAKE2B160E BLAKE2B160 BLAKE2B224E BLAKE2B224 BLAKE2B384E BLAKE2B384 BLAKE2BP512E BLAKE2BP512 BLAKE2S256E BLAKE2S256 BLAKE2S160E BLAKE2S160 BLAKE2S224E BLAKE2S224 BLAKE2SP256E BLAKE2SP256 BLAKE2SP224E BLAKE2SP224 SHA1E SHA1 MD5E MD5 WORM URL X* remote types: git gcrypt p2p S3 bup directory rsync web bittorrent webdav adb tahoe glacier ddar git-lfs httpalso borg hook external operating system: linux x86_64 supported repository versions: 8 upgrade supported from repository versions: 0 1 2 3 4 5 6 7 local repository version: 8
% uname -a Linux muaddib 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) x86_64 GNU/Linux ```
I don't know if this is expected behaviour, but for some files I imported from an importtree, when I use git-annex whereused --key with the correct key, nothing is shown unless I also add --historical
And then I am shown the importtree branch information. It doesn't seem to make sense to me. The file is definitely present, and git-annex whereis confirms this, as does git-annex lock/unlock
Willing to add more context if this is a little too vague
Shaddy Baddah (beryllium at shaddybaddah dot name)