update example to actually work with new --format option

This commit is contained in:
Joey Hess 2011-12-22 20:29:24 -04:00
parent db964e358f
commit 13a0c292b3
2 changed files with 6 additions and 2 deletions

View file

@ -24,3 +24,5 @@ I want this because I have copies of various of mine (photos, in particular) sca
(Another way to do this would be to "git annex add" them all, and then use a "git annex remove-duplicates" that could prompt me about which files are duplicates of each other, and then I could pipe that command's output into xargs git rm.)
(As I write this, I realize it's possible to parse the destination of the symlink in a way that does this..)
>

View file

@ -8,7 +8,9 @@ My main concern with putting this in git-annex is that finding duplicates necess
So I would rather come at this from a different angle.. like providing a way to output a list of files and their associated keys, which the user can then use in their own shell pipelines to find duplicate keys:
git annex find --include '*' --format=\"%f %k\n\" | sort foo --key 2 | uniq --all-repeated --skip-fields=1
git annex find --include '*' --format='${file} ${key}\n' | sort --key 2 | uniq --all-repeated --skip-fields=1
(Making that properly handle filenames with spaces is left as an exercise for the reader..)
Which is implemented now!
(Making that pipeline properly handle filenames with spaces is left as an exercise for the reader..)
"""]]