1
0
mirror of https://github.com/git/git.git synced 2024-09-28 03:00:25 +02:00

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
This commit is contained in:
Junio C Hamano 2013-07-22 11:24:05 -07:00
commit 4c72ee838f

View File

@ -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;
}
}
}