1
0
mirror of https://github.com/git/git.git synced 2024-09-28 18:32:37 +02:00

upload-pack: Check for NOT_SHALLOW flag before sending a shallow to the client.

A commit may have been put on the shallow list, and then reached from
another branch and marked NOT_SHALLOW without being removed from the
list.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Alexandre Julliard 2006-11-24 15:58:25 +01:00 committed by Junio C Hamano
parent d6491e3a21
commit 1f2de76981

@ -565,7 +565,7 @@ static void receive_needs(void)
SHALLOW, NOT_SHALLOW);
while (result) {
struct object *object = &result->item->object;
if (!(object->flags & CLIENT_SHALLOW)) {
if (!(object->flags & (CLIENT_SHALLOW|NOT_SHALLOW))) {
packet_write(1, "shallow %s",
sha1_to_hex(object->sha1));
register_shallow(object->sha1);