aboutsummaryrefslogtreecommitdiff
path: root/fetch-pack.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2006-09-26 11:27:39 -0400
committerJunio C Hamano <junkio@cox.net>2006-09-27 00:12:00 -0700
commite4fe4b8ef7cdde842a9e5e2594d0fba1367d9dd3 (patch)
tree4a5d5a74da17b42637095fa451f3d11c739fe665 /fetch-pack.c
parent780e6e735be189097dad4b223d8edeb18cce1928 (diff)
downloadgit-e4fe4b8ef7cdde842a9e5e2594d0fba1367d9dd3.tar.gz
git-e4fe4b8ef7cdde842a9e5e2594d0fba1367d9dd3.tar.xz
let the GIT native protocol use offsets to delta base when possible
There is no reason not to always do this when both ends agree. Therefore a client that can accept offsets to delta base always sends the "ofs-delta" flag. The server will stream a pack with or without offset to delta base depending on whether that flag is provided or not with no additional cost. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'fetch-pack.c')
-rw-r--r--fetch-pack.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fetch-pack.c b/fetch-pack.c
index e8708aa80..474d54520 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -166,12 +166,13 @@ static int find_common(int fd[2], unsigned char *result_sha1,
}
if (!fetching)
- packet_write(fd[1], "want %s%s%s%s%s\n",
+ packet_write(fd[1], "want %s%s%s%s%s%s\n",
sha1_to_hex(remote),
(multi_ack ? " multi_ack" : ""),
(use_sideband == 2 ? " side-band-64k" : ""),
(use_sideband == 1 ? " side-band" : ""),
- (use_thin_pack ? " thin-pack" : ""));
+ (use_thin_pack ? " thin-pack" : ""),
+ " ofs-delta");
else
packet_write(fd[1], "want %s\n", sha1_to_hex(remote));
fetching++;