Skip to content

Commit 4c72ee8

Browse files
committed
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
2 parents a0c1aa2 + 4b79695 commit 4c72ee8

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

shallow.c

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,12 @@ struct commit_list *get_shallow_commits(struct object_array *heads, int depth,
110110
continue;
111111
*pointer = cur_depth;
112112
}
113-
if (cur_depth < depth) {
114-
if (p->next)
115-
add_object_array(&p->item->object,
116-
NULL, &stack);
117-
else {
118-
commit = p->item;
119-
cur_depth = *(int *)commit->util;
120-
}
121-
} else {
122-
commit_list_insert(p->item, &result);
123-
p->item->object.flags |= shallow_flag;
113+
if (p->next)
114+
add_object_array(&p->item->object,
115+
NULL, &stack);
116+
else {
117+
commit = p->item;
118+
cur_depth = *(int *)commit->util;
124119
}
125120
}
126121
}

0 commit comments

Comments
 (0)