We should make sure that the protocol is still extensible.

This just reformats if .. else if .. else chain to make it clear we
are handling extended response from the other end.
This commit is contained in:
Junio C Hamano 2006-11-13 22:04:56 -08:00
parent 16ad357910
commit cf01bd52ef

View File

@ -202,7 +202,9 @@ static int find_common(int fd[2], unsigned char *result_sha1,
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))
@ -211,7 +213,8 @@ static int find_common(int fd[2], unsigned char *result_sha1,
parse_object(sha1);
if (unregister_shallow(sha1))
die("no shallow found: %s", line);
} else
continue;
}
die("expected shallow/unshallow, got %s", line);
}
}