summaryrefslogtreecommitdiff
path: root/doc/bugs/git_annex_unused_seems_to_check_for_current_path.mdwn
blob: f2d301cd7cdac2f9b1558c6d418ea6f72c873961 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
When I run `git annex unused` from my repository's root it shows everything ok:

    ~/annex$ git annex unused
    unused  (checking for unused data...) ok

But... When I run it from a subdirectory, it shows a lot:

    ~/annex/Software$ git annex unused
    unused  (checking for unused data...) 
      Some annexed data is no longer pointed to by any files in the repository:
        NUMBER  KEY
        1       SHA1:########################################
    ...
        921     SHA1:########################################
      (To see where data was previously used, try: git log --stat -S'KEY')
      (To remove unwanted data: git-annex dropunused NUMBER)
      ok

Is this a bug or by design? By removing these "unused" files with `dropunused` I've just lost the only copy of 160 files.

I am using git-annex version 836e71297b8e3b5bd6f89f7eb1198f59af985b0b

> I'm very sorry you lost data.
> 
> But, git annex unused absolutely does not let the current directory
> influence what it does. It always scans the entire repo from the top.
> And I've tested it just now to make sure that in a subdirectory
> it does the same thing as at the top. 
> 
> There are only two ways this could happen that I can think of:
> 
> 1. If "Software" were a separate git repository than "~/annex".
> 2. If gitignores or something made `git ls-files`
>    not list the files when ran in the subdir. This seems *possible*,
>    but I don't know how to construct such an ignore.
> 
> --[[Joey]] 

>> Closing as there is no followup. [[done]] --[[Joey]]