summaryrefslogtreecommitdiff
path: root/doc/bugs/Won__39__t_drop_files__44___even_though_remote_annexes_have_at_least_numcopies.mdwn
blob: ec87cefbe6620324690e0368a610a5a392fd570e (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
### Please describe the problem.
On a Windows machine, I try to drop some files from an annex. These files exist in the origin annex. However, the drop fails, claiming it can't verify the existence of the remote copies.

### What steps will reproduce the problem?
1. Create annex, serve git repo over HTTP.
2. clone repo. "git annex get ."
3. "git annex drop <file>". This will fail.


### What version of git-annex are you using? On what operating system?
Windows:  4.20130709-gea6fdc7
Debian: 3.20120629

### Please provide any additional information below.

[[!format sh """
git annex -vd drop file2.txt
[<datetime>] read: git ["--git-dir=C:\\Users\\<user>\\test_annex_2\\.git","--work-tree=C:\\Users\\<user>\\test_annex_2","ls-files","--cached","-z","--","file2.txt"]
[<datetime>] chat: git ["--git-dir=C:\\Users\\<user>\\test_annex_2\\.git","--work-tree=C:\\Users\\<user>\\test_annex_2","check-attr","-z","--stdin","annex.backend","annex.numcopies","--"]
drop file2.txt [<datetime>] read: git ["--git-dir=C:\\Users\\<user>\\test_annex_2\\.git","--work-tree=C:\\Users\\<user>\\test_annex_2","show-ref","git-annex"]
[<datetime>] read: git ["--git-dir=C:\\Users\\<user>\\test_annex_2\\.git","--work-tree=C:\\Users\\<user>\\test_annex_2","show-ref","--hash","refs/heads/git-annex"]
[<datetime>] read: git ["--git-dir=C:\\Users\\<user>\\test_annex_2\\.git","--work-tree=C:\\Users\\<user>\\test_annex_2","log","refs/heads/git-annex..37bdd895d74131fddbdb8d2e6ae707ee2097598e","--oneline","-n1"]
[<datetime>] read: git ["--git-dir=C:\\Users\\<<user>>\\test_annex_2\\.git","--work-tree=C:\\Users\\<user>\\test_annex_2","log","refs/heads/git-annex..f0ba6f30c63a9d586642d828c37613894191931e","--oneline","-n1"]
[<datetime>] chat: git ["--git-dir=C:\\Users\\<user>\\test_annex_2\\.git","--work-tree=C:\\Users\\<user>\\test_annex_2","cat-file","--batch"]
[<datetime>] read: curl ["-s","--head","-L","http://192.168.0.8:8000/test_annex_2/.git/annex/objects/738/e2a/SHA256-s27--4fc887746d7ea6c9574f6735bd3dfd9b0485b30acaaf0727658cd1796991dd2d/SHA256-s27--4fc887746d7ea6c9574f6735bd3dfd9b0485b30acaaf0727658cd1796991dd2d","-w","%{http_code}"]
(unsafe)
  Could only verify the existence of 0 out of 1 necessary copies

  Rather than dropping this file, try using: git annex move

  (Use --force to override this check, or adjust annex.numcopies.)
failed
git-annex: drop: 1 failed
"""]]

the given curl command fails with a 404, because the remote annex isn't using the 3-character hash directory scheme, but the 2-character one, and it seems that 'annex drop' doesn't check both schemes (unlike annex get).

> Ah, the http remote is a non-bare repository, that's why. 
> Ok, [[fixed|done]]! --[[Joey]]