Currently fetching a sha1 fails on

$ git --version && uname -a
git version 1.9.4
Linux nixos 3.12.23 #1-NixOS SMP Thu Jan 1 00:00:01 UTC 1970 x86_64 GNU/Linux

$ rm -rf test && mkdir test && cd test && git init
Initialized empty Git repository in ~/test/.git/

$ git fetch --depth 1
error: no such remote ref 782735203c316041df120748e5e88c1787cdf4da

I tried with head, same error. However, if I clone the full repository
and then manually execute git upload-pack, it successfully fetches the

$ git fetch master
<wait an hour>
$ git checkout -b sha1 782735203c316041df120748e5e88c1787cdf4da
$ printf "0045want %s multi_ack_detailed\n000Ddeepen
1\n00000009done\n0000" "782735203c316041df120748e5e88c1787cdf4da"
$ cat input | git upload-pack --stateless-rpc . > output
$ sed -z "s/.*0008NAK\n//" < output > output.pack
$ git index-pack output.pack && git verify-pack -v output.pack | grep commit
782735203c316041df120748e5e88c1787cdf4da commit 374 234 12

So theoretically this is supported server-side. Unfortunately does not agree:

$ curl --data-binary @input --header "Content-Type:
application/x-git-upload-pack-request" --header "Accept-Encoding:
gzip" --header "Accept: application/x-git-upload-pack-result" --header
"Expect:" >
$ wc -c output
0 output

Why is there a discrepancy between and upload-pack

-- Allan Gardner
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to