upload-pack: send shallow info over stdin to pack-objects
commitb790e0f67cd97f29b72cb9007632b0329e5eebec
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Tue, 11 Mar 2014 12:59:46 +0000 (11 19:59 +0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 11 Mar 2014 20:32:10 +0000 (11 13:32 -0700)
tree4c35abd01b4207524fe87a85334c3d65bf755abe
parent16216b6ab1073b7aaa8225c32208758e6ea16629
upload-pack: send shallow info over stdin to pack-objects

Before cdab485 (upload-pack: delegate rev walking in shallow fetch to
pack-objects - 2013-08-16) upload-pack does not write to the source
repository. cdab485 starts to write $GIT_DIR/shallow_XXXXXX if it's a
shallow fetch, so the source repo must be writable.

git:// servers do not need write access to repos and usually don't
have it, which means cdab485 breaks shallow clone over git://

Instead of using a temporary file as the media for shallow points, we
can send them over stdin to pack-objects as well. Prepend shallow
SHA-1 with --shallow so pack-objects knows what is what.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-pack-objects.txt
builtin/pack-objects.c
t/t5537-fetch-shallow.sh
upload-pack.c