diff options
author | Max Kirillov <max@max630.net> | 2018-07-27 05:48:59 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-07-27 19:47:52 +0200 |
commit | 6c213e863aeb0af078bf82deefb22da20427c2ab (patch) | |
tree | e57aa5d2f715e46fc3605bf659322a1ed747e195 /help.c | |
parent | http-backend: respect CONTENT_LENGTH as specified by rfc3875 (diff) | |
download | git-6c213e863aeb0af078bf82deefb22da20427c2ab.tar.xz git-6c213e863aeb0af078bf82deefb22da20427c2ab.zip |
http-backend: respect CONTENT_LENGTH for receive-pack
Push passes to another commands, as described in
https://public-inbox.org/git/20171129032214.GB32345@sigill.intra.peff.net/
As it gets complicated to correctly track the data length, instead transfer
the data through parent process and cut the pipe as the specified length is
reached. Do it only when CONTENT_LENGTH is set, otherwise pass the input
directly to the forked commands.
Add tests for cases:
* CONTENT_LENGTH is set, script's stdin has more data, with all combinations
of variations: fetch or push, plain or compressed body, correct or truncated
input.
* CONTENT_LENGTH is specified to a value which does not fit into ssize_t.
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Max Kirillov <max@max630.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'help.c')
-rw-r--r-- | help.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -609,6 +609,7 @@ int cmd_version(int argc, const char **argv, const char *prefix) else printf("no commit associated with this build\n"); printf("sizeof-long: %d\n", (int)sizeof(long)); + printf("sizeof-size_t: %d\n", (int)sizeof(size_t)); /* NEEDSWORK: also save and output GIT-BUILD_OPTIONS? */ } return 0; |