X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=upload-pack.c;h=a49d87244706a4faacaadf7916ec86f2e2c0f04e;hb=98e1a4186acd4b71da1daae5c522cb6ac6d1d904;hp=e15ebdc287e9ed7b91677a2bb8cb13dfc1abe639;hpb=e7cf1da70f1bbb477614547ca2874392c9d37862;p=git.git diff --git a/upload-pack.c b/upload-pack.c index e15ebdc28..a49d87244 100644 --- a/upload-pack.c +++ b/upload-pack.c @@ -397,12 +397,11 @@ static int get_common_commits(void) static char line[1000]; unsigned char sha1[20]; char hex[41], last_hex[41]; - int len; save_commit_buffer = 0; for(;;) { - len = packet_read_line(0, line, sizeof(line)); + int len = packet_read_line(0, line, sizeof(line)); reset_timeout(); if (!len) { @@ -410,7 +409,7 @@ static int get_common_commits(void) packet_write(1, "NAK\n"); continue; } - len = strip(line, len); + strip(line, len); if (!prefixcmp(line, "have ")) { switch (got_sha1(line+5, sha1)) { case -1: /* they have what we do not */