summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 16ad357)
raw | patch | inline | side by side (parent: 16ad357)
author | Junio C Hamano <junkio@cox.net> | |
Tue, 14 Nov 2006 06:04:56 +0000 (22:04 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 24 Nov 2006 23:42:49 +0000 (15:42 -0800) |
This just reformats if .. else if .. else chain to make it clear we
are handling extended response from the other end.
are handling extended response from the other end.
fetch-pack.c | patch | blob | history |
diff --git a/fetch-pack.c b/fetch-pack.c
index c3064b94ad1d9e682014a83eb46349af5733e295..6fd457035ef7d5ea0e0a6104aa9c73b57c5d949b 100644 (file)
--- a/fetch-pack.c
+++ b/fetch-pack.c
if (!fetching)
return 1;
- if (depth > 0) {
+ if (depth > 0) {
char line[1024];
unsigned char sha1[20];
int len;
if (lookup_object(sha1))
continue;
register_shallow(sha1);
- } else if (!strncmp("unshallow ", line, 10)) {
+ continue;
+ }
+ if (!strncmp("unshallow ", line, 10)) {
if (get_sha1_hex(line + 10, sha1))
die("invalid unshallow line: %s", line);
if (!lookup_object(sha1))
parse_object(sha1);
if (unregister_shallow(sha1))
die("no shallow found: %s", line);
- } else
- die("expected shallow/unshallow, got %s", line);
+ continue;
+ }
+ die("expected shallow/unshallow, got %s", line);
}
}