Merge branch 'sp/smart-http'
* sp/smart-http: (37 commits) http-backend: Let gcc check the format of more printf-type functions. http-backend: Fix access beyond end of string. http-backend: Fix bad treatment of uintmax_t in Content-Length t5551-http-fetch: Work around broken Accept header in libcurl t5551-http-fetch: Work around some libcurl versions http-backend: Protect GIT_PROJECT_ROOT from /../ requests Git-aware CGI to provide dumb HTTP transport http-backend: Test configuration options http-backend: Use http.getanyfile to disable dumb HTTP serving test smart http fetch and push http tests: use /dumb/ URL prefix set httpd port before sourcing lib-httpd t5540-http-push: remove redundant fetches Smart HTTP fetch: gzip requests Smart fetch over HTTP: client side Smart push over HTTP: client side Discover refs via smart HTTP server when available http-backend: more explict LocationMatch http-backend: add example for gitweb on same URL http-backend: use mod_alias instead of mod_rewrite ... Conflicts: .gitignore remote-curl.c
This commit is contained in:
@ -627,6 +627,8 @@ static void add_alternate_refs(void)
|
||||
|
||||
int cmd_receive_pack(int argc, const char **argv, const char *prefix)
|
||||
{
|
||||
int advertise_refs = 0;
|
||||
int stateless_rpc = 0;
|
||||
int i;
|
||||
char *dir = NULL;
|
||||
|
||||
@ -635,7 +637,15 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix)
|
||||
const char *arg = *argv++;
|
||||
|
||||
if (*arg == '-') {
|
||||
/* Do flag handling here */
|
||||
if (!strcmp(arg, "--advertise-refs")) {
|
||||
advertise_refs = 1;
|
||||
continue;
|
||||
}
|
||||
if (!strcmp(arg, "--stateless-rpc")) {
|
||||
stateless_rpc = 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
usage(receive_pack_usage);
|
||||
}
|
||||
if (dir)
|
||||
@ -664,12 +674,16 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix)
|
||||
" report-status delete-refs ofs-delta " :
|
||||
" report-status delete-refs ";
|
||||
|
||||
add_alternate_refs();
|
||||
write_head_info();
|
||||
clear_extra_refs();
|
||||
if (advertise_refs || !stateless_rpc) {
|
||||
add_alternate_refs();
|
||||
write_head_info();
|
||||
clear_extra_refs();
|
||||
|
||||
/* EOF */
|
||||
packet_flush(1);
|
||||
/* EOF */
|
||||
packet_flush(1);
|
||||
}
|
||||
if (advertise_refs)
|
||||
return 0;
|
||||
|
||||
read_head_info();
|
||||
if (commands) {
|
||||
|
Reference in New Issue
Block a user