summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar anarcat <anarcat@web>2015-10-20 04:44:39 +0000
committerGravatar admin <admin@branchable.com>2015-10-20 04:44:39 +0000
commit0401fa577d5a8f8e5280f3acba8ed802e6fb11ea (patch)
treea9e0ab4829a81a37e52877ff3a41e2beb3b9308b
parent2ef94e9c027493a71eee4050594d587754af0752 (diff)
trick question
-rw-r--r--doc/todo/show_me_where_unused_file_was__44___i_can_wait.mdwn7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/todo/show_me_where_unused_file_was__44___i_can_wait.mdwn b/doc/todo/show_me_where_unused_file_was__44___i_can_wait.mdwn
new file mode 100644
index 000000000..c080d2b7c
--- /dev/null
+++ b/doc/todo/show_me_where_unused_file_was__44___i_can_wait.mdwn
@@ -0,0 +1,7 @@
+i know that `git annex unused` would be slower if, instead of just showing the hash, it would also show the pathname where the file was. it does tell me that i can use `git log --stat -SKEY` to find that out myself, but then i would need to make some silly shell script to loop over multiple files. i'm hoping that git-annex has more efficient and clever ways of doing that, and even if it's slower, i'd be ready to wait if there was an extra flag to show me where it was...
+
+i have used this oneliner so far, but it's ugly and painful, especially since `git annex unused` doesn't have a very parseable output format...
+
+ git annex unused 2>&1 | grep '^ *[0-9][0-9]*' | sed 's/^ *[0-9][0-9]* *//' | xargs -I'{}' git log --oneline --stat -S'{}' -1
+
+any way to do this more easily? --[[anarcat]]