summaryrefslogtreecommitdiff
path: root/doc/bugs/git-annex_fails_to_parse_external_remotes__39_____34__CHECKPRESENT-SUCCESS__34___response.mdwn
blob: f18d7a522bd76d5ba4e342e16f8939c79a913db1 (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
### Please describe the problem.

During a git annex fsck --fast --from <someexternalremote>, any CHECKPRESENT-SUCCESS responses are considered failures:

    fsck file 
      failed to download file from remote
    failed
    (recording state in git...)
    git-annex: fsck: 1 failed

It doesn't appear that the external protocol is being violated in any way; it occurs both with my special external (https://git.encryptio.com/slime/blob/refs/heads/master:/misc/git-annex-remote-slime/main.go) and with the example external remote. Making these dump their IO to stderr shows they're behaving correctly, as far as I can tell.

`git annex testremote` passes on these remotes too, so it's not catching the issue (though it probably should.)

These implementations used to work fine (~6mo ago? not sure); I haven't been able to get git-annex to build (cabal woes), so I can't bisect it myself.

### What steps will reproduce the problem?

With https://git-annex.branchable.com/special_remotes/external/example.sh/ installed as "git-annex-remote-externaltest", this script shows the issue:

[[!format sh """
#!/bin/sh
set -e

[ -e "annex-test-dirs/repo/.git/annex/objects" ] && (
    find "annex-test-dirs/repo/.git/annex/objects" -type f -exec chmod 0644 {} \;
    find "annex-test-dirs/repo/.git/annex/objects" -type d -exec chmod 0755 {} \;
)

rm -rf annex-test-dirs
mkdir -p annex-test-dirs/{repo,data}

cd annex-test-dirs/repo
git init
git annex init
MYPASSWORD=a MYLOGIN=b git annex initremote ext type=external encryption=none externaltype=externaltest directory="$(pwd)/../data"

echo "data" > file
git annex add file
git commit -m message

git annex copy --to ext

# this works:
git annex fsck --from ext

# but this incorrectly fails and marks the file "not present":
git annex fsck --fast --from ext
"""]]

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

git-annex 5.20150420-gb0ebb23, from the linux standalone tarball, on linux.

> Upgrade, this was fixed earlier this week, in [[!commit
> cfbeb1e7b74aa9759bd62b342e80869de582f10d]]; [[done]] afaik --[[Joey]]