summaryrefslogtreecommitdiff
path: root/doc/walkthrough/unused_data/comment_1_684b7b652d3a8ec04f32129c5528f1ab._comment
blob: 2be2a6463f8b76dcebd4d6a66b6a882c609e43cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
[[!comment format=mdwn
 username="bremner"
 ip="156.34.89.108"
 subject="finding data that isn't unused, but should be."
 date="2012-10-17T20:32:11Z"
 content="""
Sometimes links to annexed data still exists on some branch, when it was supposed to be dropped. Here is how I found these; perhaps there is a simpler way.

    % git annex find --format '${key}\n' | sort > /tmp/known-keys
    % find .git/annex/objects -type f -exec basename {} \; | sort  > /tmp/local-keys
    % comm -23 /tmp/local-keys /tmp/known-keys

to look for what branch these are on, try 

    % git log --stat --all -S$key

for one of the keys output above. In my case it was the same remote branch keeping them all alive.


*EDIT* sort key lists to make comm work properly

"""]]