blob: 3860456d23c5cf45b11498f5bac138d5d0166843 (
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
|
### Please describe the problem.
(small) identical files fail to unannex, leaving broken symlinks, except for the first copy.
### What steps will reproduce the problem?
* Have multiple identical files. For example, run this, which creates four 6-byte files:
> echo Hello>file1.txt && cp file1.txt file2.txt && cp file1.txt file3.txt && cp file1.txt file4.txt
* Run this (git init needs credentials to have been specified though)
> git init && git-annex init && git-annex add
Now there are 4 symlinks, pointing to the same object:
> lrwxrwxrwx 1 186 Aug 16 15:54 file1.txt -> .git/annex/objects/31/XV/SHA256E-s6--66a045b452102c59d840ec097d59d9467e13a3f34f6494e539ffd32c1bb35f18.txt/SHA256E-s6--66a045b452102c59d840ec097d59d9467e13a3f34f6494e539ffd32c1bb35f18.txt
* Optionally run "git commit -a". It doesn't affect the outcome.
* Run git-annex unannex
> $ git annex unannex
> unannex file1.txt ok
> (Recording state in git...)
> $
Now file1.txt is a normal 6-byte file again, but 2, 3, and 4 are broken symlinks:
-rw-r----- 1 6 Aug 16 15:54 file1.txt
lrwxrwxrwx 1 186 Aug 16 15:54 file2.txt -> .git/annex/objects/31/XV/SHA256E-s6--66a045b452102c59d840ec097d59d9467e13a3f34f6494e539ffd32c1bb35f18.txt/SHA256E-s6--66a045b452102c59d840ec097d59d9467e13a3f34f6494e539ffd32c1bb35f18.txt
lrwxrwxrwx 1 186 Aug 16 15:54 file3.txt -> .git/annex/objects/31/XV/SHA256E-s6--66a045b452102c59d840ec097d59d9467e13a3f34f6494e539ffd32c1bb35f18.txt/SHA256E-s6--66a045b452102c59d840ec097d59d9467e13a3f34f6494e539ffd32c1bb35f18.txt
lrwxrwxrwx 1 186 Aug 16 15:54 file4.txt -> .git/annex/objects/31/XV/SHA256E-s6--66a045b452102c59d840ec097d59d9467e13a3f34f6494e539ffd32c1bb35f18.txt/SHA256E-s6--66a045b452102c59d840ec097d59d9467e13a3f34f6494e539ffd32c1bb35f18.txt
$ git-annex fsck
fsck file2.txt
** No known copies exist of file2.txt
failed
fsck file3.txt
** No known copies exist of file3.txt
failed
fsck file4.txt
** No known copies exist of file4.txt
failed
git-annex: fsck: 3 failed
### What version of git-annex are you using? On what operating system?
git-annex 4.20130802 package
on Debian GNU/Linux jessie/sid (testing), amd64.
> [[dup|done]] --[[Joey]]
|