diff options
Diffstat (limited to 'upload-pack.c')
-rw-r--r-- | upload-pack.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/upload-pack.c b/upload-pack.c index 2e90ccb74f..8740002817 100644 --- a/upload-pack.c +++ b/upload-pack.c @@ -670,10 +670,17 @@ static void receive_needs(void) if (depth == 0 && shallows.nr == 0) return; if (depth > 0) { - struct commit_list *result, *backup; + struct commit_list *result = NULL, *backup = NULL; int i; - backup = result = get_shallow_commits(&want_obj, depth, - SHALLOW, NOT_SHALLOW); + if (depth == INFINITE_DEPTH) + for (i = 0; i < shallows.nr; i++) { + struct object *object = shallows.objects[i].item; + object->flags |= NOT_SHALLOW; + } + else + backup = result = + get_shallow_commits(&want_obj, depth, + SHALLOW, NOT_SHALLOW); while (result) { struct object *object = &result->item->object; if (!(object->flags & (CLIENT_SHALLOW|NOT_SHALLOW))) { |