aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shallow.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/shallow.c b/shallow.c
index 6be915f38..04712ac25 100644
--- a/shallow.c
+++ b/shallow.c
@@ -91,17 +91,12 @@ struct commit_list *get_shallow_commits(struct object_array *heads, int depth,
continue;
*pointer = cur_depth;
}
- if (cur_depth < depth) {
- if (p->next)
- add_object_array(&p->item->object,
- NULL, &stack);
- else {
- commit = p->item;
- cur_depth = *(int *)commit->util;
- }
- } else {
- commit_list_insert(p->item, &result);
- p->item->object.flags |= shallow_flag;
+ if (p->next)
+ add_object_array(&p->item->object,
+ NULL, &stack);
+ else {
+ commit = p->item;
+ cur_depth = *(int *)commit->util;
}
}
}