diff options
Diffstat (limited to 'line-log.c')
-rw-r--r-- | line-log.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/line-log.c b/line-log.c index 51d93310a4..6a7ac312a4 100644 --- a/line-log.c +++ b/line-log.c @@ -1,6 +1,7 @@ #include "git-compat-util.h" +#include "alloc.h" #include "line-range.h" -#include "cache.h" +#include "hex.h" #include "tag.h" #include "blob.h" #include "tree.h" @@ -14,8 +15,10 @@ #include "graph.h" #include "userdiff.h" #include "line-log.h" +#include "setup.h" #include "strvec.h" #include "bloom.h" +#include "tree-walk.h" static void range_set_grow(struct range_set *rs, size_t extra) { @@ -1089,10 +1092,8 @@ static struct diff_filepair *diff_filepair_dup(struct diff_filepair *pair) static void free_diffqueues(int n, struct diff_queue_struct *dq) { - int i, j; - for (i = 0; i < n; i++) - for (j = 0; j < dq[i].nr; j++) - diff_free_filepair(dq[i].queue[j]); + for (int i = 0; i < n; i++) + diff_free_queue(&dq[i]); free(dq); } @@ -1195,6 +1196,7 @@ static int process_ranges_ordinary_commit(struct rev_info *rev, struct commit *c if (parent) add_line_range(rev, parent, parent_range); free_line_log_data(parent_range); + diff_free_queue(&queue); return changed; } @@ -1282,7 +1284,8 @@ int line_log_process_ranges_arbitrary_commit(struct rev_info *rev, struct commit return changed; } -static enum rewrite_result line_log_rewrite_one(struct rev_info *rev, struct commit **pp) +static enum rewrite_result line_log_rewrite_one(struct rev_info *rev UNUSED, + struct commit **pp) { for (;;) { struct commit *p = *pp; |