diff options
Diffstat (limited to 'commit.c')
-rw-r--r-- | commit.c | 21 |
1 files changed, 10 insertions, 11 deletions
@@ -9,7 +9,7 @@ #include "hex.h" #include "repository.h" #include "object-name.h" -#include "object-store-ll.h" +#include "object-store.h" #include "utf8.h" #include "diff.h" #include "revision.h" @@ -29,6 +29,7 @@ #include "tree.h" #include "hook.h" #include "parse.h" +#include "object-file.h" #include "object-file-convert.h" static struct commit_extra_header *read_commit_extra_header_lines(const char *buf, size_t len, const char **); @@ -780,19 +781,17 @@ static void clear_commit_marks_1(struct commit_list **plist, void clear_commit_marks_many(size_t nr, struct commit **commit, unsigned int mark) { - for (size_t i = 0; i < nr; i++) { - struct commit_list *list = NULL; - - clear_commit_marks_1(&list, *commit, mark); - while (list) - clear_commit_marks_1(&list, pop_commit(&list), mark); - commit++; - } + for (size_t i = 0; i < nr; i++) + clear_commit_marks(commit[i], mark); } void clear_commit_marks(struct commit *commit, unsigned int mark) { - clear_commit_marks_many(1, &commit, mark); + struct commit_list *list = NULL; + + clear_commit_marks_1(&list, commit, mark); + while (list) + clear_commit_marks_1(&list, pop_commit(&list), mark); } struct commit *pop_commit(struct commit_list **stack) @@ -1380,7 +1379,7 @@ static int convert_commit_extra_headers(const struct commit_extra_header *orig, struct commit_extra_header *new; CALLOC_ARRAY(new, 1); if (!strcmp(orig->key, "mergetag")) { - if (convert_object_file(&out, algo, compat, + if (convert_object_file(the_repository, &out, algo, compat, orig->value, orig->len, OBJ_TAG, 1)) { free(new); |