diff options
| author | Junio C Hamano <junkio@cox.net> | 2006-10-22 22:51:42 -0700 |
|---|---|---|
| committer | Junio C Hamano <junkio@cox.net> | 2006-10-22 22:51:42 -0700 |
| commit | 05eb811aa1546b696c6c4d55593cfd4fbef0dce5 (patch) | |
| tree | bad8266ba08310f00a1998063c545dd3707fdc3c /upload-pack.c | |
| parent | 02a20456d2c5efccbdd0093ad2a16134f160c218 (diff) | |
| parent | 2d477051ef260aad352d63fc7d9c07e4ebb4359b (diff) | |
| download | git-05eb811aa1546b696c6c4d55593cfd4fbef0dce5.tar.gz | |
Merge branch 'np/pack'
* np/pack:
add the capability for index-pack to read from a stream
index-pack: compare only the first 20-bytes of the key.
git-repack: repo.usedeltabaseoffset
pack-objects: document --delta-base-offset option
allow delta data reuse even if base object is a preferred base
zap a debug remnant
let the GIT native protocol use offsets to delta base when possible
make pack data reuse compatible with both delta types
make git-pack-objects able to create deltas with offset to base
teach git-index-pack about deltas with offset to base
teach git-unpack-objects about deltas with offset to base
introduce delta objects with offset to base
Diffstat (limited to 'upload-pack.c')
| -rw-r--r-- | upload-pack.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/upload-pack.c b/upload-pack.c index 189b239cc0..9ec3775049 100644 --- a/upload-pack.c +++ b/upload-pack.c @@ -16,7 +16,7 @@ static const char upload_pack_usage[] = "git-upload-pack [--strict] [--timeout=n #define OUR_REF (1U << 1) #define WANTED (1U << 2) static int multi_ack, nr_our_refs; -static int use_thin_pack; +static int use_thin_pack, use_ofs_delta; static struct object_array have_obj; static struct object_array want_obj; static unsigned int timeout; @@ -137,7 +137,9 @@ static void create_pack_file(void) close(pu_pipe[1]); close(pe_pipe[0]); close(pe_pipe[1]); - execl_git_cmd("pack-objects", "--stdout", "--progress", NULL); + execl_git_cmd("pack-objects", "--stdout", "--progress", + use_ofs_delta ? "--delta-base-offset" : NULL, + NULL); kill(pid_rev_list, SIGKILL); die("git-upload-pack: unable to exec git-pack-objects"); } @@ -393,6 +395,8 @@ static void receive_needs(void) multi_ack = 1; if (strstr(line+45, "thin-pack")) use_thin_pack = 1; + if (strstr(line+45, "ofs-delta")) + use_ofs_delta = 1; if (strstr(line+45, "side-band-64k")) use_sideband = LARGE_PACKET_MAX; else if (strstr(line+45, "side-band")) @@ -418,7 +422,7 @@ static void receive_needs(void) static int send_ref(const char *refname, const unsigned char *sha1) { - static const char *capabilities = "multi_ack thin-pack side-band side-band-64k"; + static const char *capabilities = "multi_ack thin-pack side-band side-band-64k ofs-delta"; struct object *o = parse_object(sha1); if (!o) |
