summaryrefslogtreecommitdiff
path: root/doc/bugs/git_annex_add_removes_file_with_no_data_left.mdwn
blob: 0256c8476f3c11e532044048c5ae20aa5102797f (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
### Please describe the problem.
Using git-annex from Debian (4.20130709), I attempted to add a 410M file named `Expressionlessm.tar`. It acted like it succeeded, but the link it created was broken. Other files would add correctly.

### What steps will reproduce the problem?
I can reliably cause the file to be removed and replaced with a dangling symlink by doing `git annex add Expressionlessm.tar`. The "addition" completes much faster than normal. Using the old version of git-annex that Ubuntu provides (3.20131112ubuntu4), the file adds correctly in at least one place it was having issues.

### What version of git-annex are you using? On what operating system?
I'm using the version of git-annex from Debian Sid on Ubuntu 13.04 (perhaps that's my issue?)

### Please provide any additional information below.

[[!format sh """
# If you can, paste a complete transcript of the problem occurring here.
# If the problem is with the git-annex assistant, paste in .git/annex/daemon.log

andrew@andrew-desktop:/media/MainStore/Projects$ git status
# On branch master
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
==========Snip!=================
nothing added to commit but untracked files present (use "git add" to track)



andrew@andrew-desktop:/media/MainStore/Projects$ ls
==========Snip!=================
Expressionlessm.tar
Expressionlessm.tar.bkup
==========Snip!=================



andrew@andrew-desktop:/media/MainStore/Projects$ tar tf Expressionlessm.tar 
Expressionlessm/
==========Snip!=================
# Tar file is valid at this point


andrew@andrew-desktop:/media/MainStore/Projects$ git annex add Expressionlessm.tar
add Expressionlessm.tar ok
(Recording state in git...)



andrew@andrew-desktop:/media/MainStore/Projects$ ls
==========Snip!=================
Expressionlessm.tar
Expressionlessm.tar.bkup
==========Snip!=================



andrew@andrew-desktop:/media/MainStore/Projects$ ls -l
==========Snip!=================
lrwxrwxrwx 1 andrew andrew       109 Jul 12 02:29 Expressionlessm.tar -> ../.git/annex/objects/vk/mF/SHA256-s3131909--a2808d850ba2e880ac58bf622cd68edd7e72ea2775b984d52b5d5266c43b03f0
-rw-rw-r-- 1 andrew andrew 428759040 Jul 10 20:30 Expressionlessm.tar.bkup
==========Snip!=================



andrew@andrew-desktop:/media/MainStore/Projects$ tar tf Expressionlessm.tar 
tar: Expressionlessm.tar: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now


=================================================================
W O R K I N G   V E R S I O N
This is what it looks like when the add works.
=================================================================
andrew@andrew-desktop:/media/MainStore/Projects$ cp Expressionlessm.tar.bkup Expressionlessm.tar
andrew@andrew-desktop:/media/MainStore/Projects$ git annex add Expressionlessm.tar
add Expressionlessm.tar (checksum...) ok
(Recording state in git...)
andrew@andrew-desktop:/media/MainStore/Projects$ git status
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#	new file:   Expressionlessm.tar
#
# Untracked files:
==========Snip!=================



andrew@andrew-desktop:/media/MainStore/Projects$ ls -l
==========Snip!=================
lrwxrwxrwx 1 andrew andrew       195 Jul 12 02:20 Expressionlessm.tar -> ../.git/annex/objects/3v/Z7/SHA256-s428759040--133040f7b9d34ebce235aa24a0a16ab72af8f70e7a0722810d873815a2338eb2/SHA256-s428759040--133040f7b9d34ebce235aa24a0a16ab72af8f70e7a0722810d873815a2338eb2
-rw-rw-r-- 1 andrew andrew 428759040 Jul 10 20:30 Expressionlessm.tar.bkup
==========Snip!=================
# Notice the link target is different this time.


# End of transcript or log.
"""]]

> [[done]]; this bug is now prevented on several levels.
> 
> BTW, the earlier behavior where it didn't even make a valid .git/annex/objects/
> symlink is also explained by this bug I've fixed. It pulled a truncated
> link out of the tarball, and used that.
> --[[Joey]]