summaryrefslogtreecommitdiff
path: root/doc/bugs/assistant_not_noticing_file_renames__44___not_fixing_files.mdwn
blob: d009b55cd7d9c47f51c13b3b2abec1fb2f1f16e8 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
What steps will reproduce the problem?

In one terminal, I created a new annex and started the assistant watching it.  

In another, I added a file file1; assistant noticed it and added it to the annex.

I moved file1 to a directory directory1; the link broke and assistant did not fix it.  

I created a file called file2 inside directory 2; assistant noticed it and added it to the annex.

I moved file2 back up to the annex root directory; the link broke and assistant did not fix it.

I created a file file3 in the annex root directory; assistant noticed it and added it to the annex.

Here is the content of the first terminal, where I created the annex and ran assistant:


    ~$ mkdir testannex
    ~$ cd testannex/
    testannex$ git init .
    Initialized empty Git repository in /Users/ed/testannex/.git/
    testannex$ git annex init "test annex"
    init test annex ok
    (Recording state in git...)
    testannex$ git annex assistant --foreground
    assistant . (scanning...) (started...) add file1 (checksum...) ok
    (Recording state in git...)
    (Recording state in git...)
    add directory1/file2 (checksum...) ok
    (Recording state in git...)
    (Recording state in git...)
    add file3 (checksum...) 

here is the content of the second terminal, where I created and moved files:

    ~$ cd testannex
    testannex$ echo "file1 content" > file1
    testannex$ mkdir directory1
    testannex$ ls -l file1
    lrwxr-xr-x  1 ed  staff  180 Dec 13 15:40 file1 -> .git/annex/objects/FX/51/SHA256E-s14--edac79763e630b1b77aefb6c284bcb0362dea71c0548be0e793ffa8fd5907b80/SHA256E-s14--edac79763e630b1b77aefb6c284bcb0362dea71c0548be0e793ffa8fd5907b80
    testannex$ mv file1 directory1/
    testannex$ cd directory1/
    directory1$ cat file1
    cat: file1: No such file or directory
    directory1$ echo "file2 content" > file2
    directory1$ cat file2
    file2 content
    directory1$ cat file1
    cat: file1: No such file or directory
    directory1$ mv file2 ../
    directory1$ cd ..
    testannex$ echo "file3 content" > file3
    testannex$ 


What is the expected output? What do you see instead?

The links do not break when moved to another directory.

What version of git-annex are you using? On what operating system?

One compiled using cabal from checkout 739c937

Please provide any additional information below.

> [[fixed|done]]; this turned out to be an kqueue specific bug,
> the kqueue code statted new files, but that files for a broken symlink.
> Using lstat instead fixed this. --[[Joey]]