Merge branch 'rs/pop-commit'

Code simplification.

* rs/pop-commit:
  use pop_commit() for consuming the first entry of a struct commit_list
This commit is contained in:
Junio C Hamano
2015-10-30 13:07:03 -07:00
10 changed files with 31 additions and 92 deletions

View File

@ -1939,10 +1939,8 @@ int resolve_remote_symref(struct ref *ref, struct ref *list)
static void unmark_and_free(struct commit_list *list, unsigned int mark)
{
while (list) {
struct commit_list *temp = list;
temp->item->object.flags &= ~mark;
list = temp->next;
free(temp);
struct commit *commit = pop_commit(&list);
commit->object.flags &= ~mark;
}
}