X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=upload-pack.c;h=a49d87244706a4faacaadf7916ec86f2e2c0f04e;hb=a4df22ce49d0457f3dbec5083064f9d24e4d17dd;hp=e15ebdc287e9ed7b91677a2bb8cb13dfc1abe639;hpb=e46f778968d854d67596f844340dd56d5e2781f2;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 */