Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2009-03-07 23:02:26 +0300
committerJunio C Hamano <gitster@pobox.com>2009-03-08 07:52:23 +0300
commitfd13b21f52b499ff6fa951ce27d4b9c9f0653087 (patch)
treeb59de697d0f3ce229daabd83387ab01d162a1371 /upload-pack.c
parenteb3a9dd3279fe4b05f286665986ebf6d43a6ccc0 (diff)
Move local variables to narrower scopes
These weren't used outside and can be safely moved Signed-off-by: Benjamin Kramer <benny.kra@googlemail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'upload-pack.c')
-rw-r--r--upload-pack.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/upload-pack.c b/upload-pack.c
index e15ebdc287..a49d872447 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 */