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

View File

@ -110,17 +110,12 @@ struct commit_list *get_shallow_commits(struct object_array *heads, int depth,
continue; continue;
*pointer = cur_depth; *pointer = cur_depth;
} }
if (cur_depth < depth) { if (p->next)
if (p->next) add_object_array(&p->item->object,
add_object_array(&p->item->object, NULL, &stack);
NULL, &stack); else {
else { commit = p->item;
commit = p->item; cur_depth = *(int *)commit->util;
cur_depth = *(int *)commit->util;
}
} else {
commit_list_insert(p->item, &result);
p->item->object.flags |= shallow_flag;
} }
} }
} }