diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-10-30 21:07:03 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-10-30 21:07:03 +0100 |
commit | 0692a6c22c37e07ef07a3d2c5d39deaaa3c26ffe (patch) | |
tree | 4a25ada2e2aa20ecf3caf6e1af76e2ebf999cb85 /remote.c | |
parent | Merge branch 'mk/blame-error-message' (diff) | |
parent | use pop_commit() for consuming the first entry of a struct commit_list (diff) | |
download | git-0692a6c22c37e07ef07a3d2c5d39deaaa3c26ffe.tar.xz git-0692a6c22c37e07ef07a3d2c5d39deaaa3c26ffe.zip |
Merge branch 'rs/pop-commit'
Code simplification.
* rs/pop-commit:
use pop_commit() for consuming the first entry of a struct commit_list
Diffstat (limited to 'remote.c')
-rw-r--r-- | remote.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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; } } |