summaryrefslogtreecommitdiff
path: root/shallow.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-07-22 11:24:05 -0700
committerJunio C Hamano <gitster@pobox.com>2013-07-22 11:24:05 -0700
commit4c72ee838f1085a47a3c5144ce1088f1bca42f66 (patch)
tree373153f7a0c505521a94de9654ccb86f10e97480 /shallow.c
parenta0c1aa216130680f890ded9e057bae24b0610d98 (diff)
parent4b796951ffca7c0aa9e05d62d6d16a3c689b7f25 (diff)
downloadgit-4c72ee838f1085a47a3c5144ce1088f1bca42f66.tar.gz
Merge branch 'mk/upload-pack-off-by-one-dead-code-removal'
* mk/upload-pack-off-by-one-dead-code-removal: upload-pack: remove a piece of dead code
Diffstat (limited to 'shallow.c')
-rw-r--r--shallow.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/shallow.c b/shallow.c
index cbe2526d8c..8a9c96d019 100644
--- a/shallow.c
+++ b/shallow.c
@@ -110,17 +110,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;
}
}
}