Skip to content

Commit

Permalink
Merge branch 'mk/upload-pack-off-by-one-dead-code-removal'
Browse files Browse the repository at this point in the history
* mk/upload-pack-off-by-one-dead-code-removal:
  upload-pack: remove a piece of dead code
  • Loading branch information
Junio C Hamano committed Jul 22, 2013
2 parents a0c1aa2 + 4b79695 commit 4c72ee8
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions shallow.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
Expand Down

0 comments on commit 4c72ee8

Please sign in to comment.