Code

upload-pack: Check for NOT_SHALLOW flag before sending a shallow to the client.
authorAlexandre Julliard <julliard@winehq.org>
Fri, 24 Nov 2006 14:58:25 +0000 (15:58 +0100)
committerJunio C Hamano <junkio@cox.net>
Fri, 24 Nov 2006 23:42:50 +0000 (15:42 -0800)
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>
upload-pack.c

index d5b47507db3e1db394c3ce054bbd84e45c4a9574..d4a7b625f47d4b92a85f9efc0686f5dc3910bb6d 100644 (file)
@@ -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);