forum/How can I determine why a given file is "used"?git-annexhttp://git-annex.branchable.com/forum/How_can_I_determine_why_a_given_file_is___34__used__34____63__/git-annexikiwiki2021-05-12T16:22:48Zcomment 1http://git-annex.branchable.com/forum/How_can_I_determine_why_a_given_file_is___34__used__34____63__/comment_1_30217e593a04cefa30619025d0a58108/joey2021-05-10T19:20:19Z2021-05-10T19:04:00Z
<p>Is it in use in git's index? git-annex addunused adds a link to the working
tree, and also stages it in the index. You said
"I rm'ed the symlink", but that would leave it in the index, so still used.</p>
<p>(It's also theoretically possible for git-annex unused to incorrectly
decide something is unused that is not -- it uses a bloom filter which can
have false positives -- but this is highly unlikely unless your repo has
a huge number of files in it. The annex.bloomaccuracy and annex.bloomaccuracy
configs can be used to tweak the bloom filter.)</p>
comment 1http://git-annex.branchable.com/forum/How_can_I_determine_why_a_given_file_is___34__used__34____63__/comment_1_6793035e1c0fb329b3094bf66a982fa3/kyle2021-05-10T19:05:57Z2021-05-10T19:05:57Z
<blockquote><p>I rm'ed the symlink, expecting git annex unused to again report K as
unused. But it doesn't; it still reports no unused files.</p></blockquote>
<p>That's odd. Did you also remove it from the index (<code>git rm</code>)?</p>
<blockquote><p>git log --stat --no-textconv -S'K'</p></blockquote>
<p>Perhaps try with <code>--all</code> to do a wider search, though given what you
said above (that is was reported as unused before using <code>addunused</code>) my
bet would be on the index.</p>
D'oh!http://git-annex.branchable.com/forum/How_can_I_determine_why_a_given_file_is___34__used__34____63__/comment_3_7cc944d96f4620e98fe22a554684ad22/erics2021-05-10T21:26:25Z2021-05-10T21:26:25Z
<p>"Is it in use in git's index?"</p>
<p>That was it; after <em>git reset</em>, the file is now again reported as unused.</p>
<p>Thanks, and sorry for the noise.</p>
comment 4http://git-annex.branchable.com/forum/How_can_I_determine_why_a_given_file_is___34__used__34____63__/comment_4_8323e9160d81a4a65f2ca545c4469869/erics2021-05-10T22:06:02Z2021-05-10T22:06:02Z
May I suggest a <em>what references this key</em> command? With that, I'd have been able to figure out for myself what I'd done wrong.
comment 5http://git-annex.branchable.com/forum/How_can_I_determine_why_a_given_file_is___34__used__34____63__/comment_5_a74ece6acb2184c4990b434d7357ea00/joey2021-05-12T16:22:48Z2021-05-12T15:38:13Z
I think that's a good idea... <span class="createlink"><a href="http://git-annex.branchable.com/ikiwiki.cgi?do=create&from=forum%2FHow_can_I_determine_why_a_given_file_is___34__used__34____63__%2Fcomment_5_a74ece6acb2184c4990b434d7357ea00&page=todo%2Fgit-annex_whereused" rel="nofollow">?</a>git-annex whereused</span>