{"thread":{"id":"3399","subject":"[PATCH] send-pack --thin: use \"thin pack\" delta transfer.","startedAt":"2006-02-19T23:28:07Z","lastAt":"2006-02-19T23:28:07Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"16431","messageId":"7v7j7rexo8.fsf@assigned-by-dhcp.cox.net","threadId":"3399","inReplyTo":null,"subject":"[PATCH] send-pack --thin: use \"thin pack\" delta transfer.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-02-19T23:28:07Z","receivedAt":"2006-02-19T23:28:07Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"The new flag loosens the usual \"self containedness\" requirment\nof packfiles, and sends deltified representation of objects when\nwe know the other side has the base objects needed to unpack\nthem.  This would help reducing the transfer size.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n\n---\n\n * Together with the other two patches, this allows you to say\n   \"git-send-pack --thin\" to implement the \"delta transfer\" we\n   discussed earlier.\n\n send-pack.c |   10 +++++++++-\n 1 files changed, 9 insertions(+), 1 deletions(-)\n\n7830d82ec3103e3e4c099750620626b3d53530be\ndiff --git a/send-pack.c b/send-pack.c\nindex 990be3f..ad22da5 100644\n--- a/send-pack.c\n+++ b/send-pack.c\n@@ -12,6 +12,7 @@ static const char *exec = \"git-receive-p\n static int verbose = 0;\n static int send_all = 0;\n static int force_update = 0;\n+static int use_thin_pack = 0;\n \n static int is_zero_sha1(const unsigned char *sha1)\n {\n@@ -41,7 +42,10 @@ static void exec_rev_list(struct ref *re\n \tint i = 0;\n \n \targs[i++] = \"rev-list\";\t/* 0 */\n-\targs[i++] = \"--objects\";\t/* 1 */\n+\tif (use_thin_pack)\t/* 1 */\n+\t\targs[i++] = \"--objects-edge\";\n+\telse\n+\t\targs[i++] = \"--objects\";\n \twhile (refs) {\n \t\tchar *buf = malloc(100);\n \t\tif (i > 900)\n@@ -361,6 +365,10 @@ int main(int argc, char **argv)\n \t\t\t\tverbose = 1;\n \t\t\t\tcontinue;\n \t\t\t}\n+\t\t\tif (!strcmp(arg, \"--thin\")) {\n+\t\t\t\tuse_thin_pack = 1;\n+\t\t\t\tcontinue;\n+\t\t\t}\n \t\t\tusage(send_pack_usage);\n \t\t}\n \t\tif (!dest) {\n-- \n1.2.2.g0d27\n"}]}