mirror of
https://github.com/git/git.git
synced 2024-11-25 10:54:00 +08:00
249b2004d8
The git-remote-curl backend detects if the remote server supports the git-upload-pack service, and if so, runs git-fetch-pack locally in a pipe to generate the want/have commands. The advertisements from the server that were obtained during the discovery are passed into git-fetch-pack before the POST request starts, permitting server capability discovery and enablement. Common objects that are discovered are appended onto the request as have lines and are sent again on the next request. This allows the remote side to reinitialize its in-memory list of common objects during the next request. Because all requests are relatively short, below git-remote-curl's 1 MiB buffer limit, requests will use the standard Content-Length header and be valid HTTP/1.0 POST requests. This makes the fetch client more tolerant of proxy servers which don't support HTTP/1.1 or the chunked transfer encoding. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> CC: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
29 lines
479 B
C
29 lines
479 B
C
#ifndef FETCH_PACK_H
|
|
#define FETCH_PACK_H
|
|
|
|
struct fetch_pack_args
|
|
{
|
|
const char *uploadpack;
|
|
int unpacklimit;
|
|
int depth;
|
|
unsigned quiet:1,
|
|
keep_pack:1,
|
|
lock_pack:1,
|
|
use_thin_pack:1,
|
|
fetch_all:1,
|
|
verbose:1,
|
|
no_progress:1,
|
|
include_tag:1,
|
|
stateless_rpc:1;
|
|
};
|
|
|
|
struct ref *fetch_pack(struct fetch_pack_args *args,
|
|
int fd[], struct child_process *conn,
|
|
const struct ref *ref,
|
|
const char *dest,
|
|
int nr_heads,
|
|
char **heads,
|
|
char **pack_lockfile);
|
|
|
|
#endif
|