Skip to contentSkip to conversation

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

PATCH In review Alexandre Julliard 1 participant 1 message Aug 11, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 2/5 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.

---
 upload-pack.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
upload-pack.c +1 -1
index d5b4750..d4a7b62 100644
@@ -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);
Signature · 4 lines
1.4.4.1.ga335e

-- 
Alexandre Julliard