From d01141de5ab02cf4a156183ef4dc5ee8bf2638a3 Mon Sep 17 00:00:00 2001 From: Sergey Organov Date: Tue, 29 Sep 2020 14:31:22 +0300 Subject: diff: get rid of redundant 'dense' argument Get rid of 'dense' argument that is redundant for every function that has 'struct rev_info *rev' argument as well, as the value of 'dense' passed is always taken from 'rev->dense_combined_merges' field. The only place where this was not the case is in 'submodule.c' where 'diff_tree_combined_merge()' was called with '1' for 'dense' argument. However, at that call the 'revs' instance used is local to the function, and we now just set 'revs->dense_combined_merges' to 1 in this local instance. Signed-off-by: Sergey Organov Signed-off-by: Junio C Hamano --- builtin/diff.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'builtin') diff --git a/builtin/diff.c b/builtin/diff.c index cb98811c21..cd4083fed9 100644 --- a/builtin/diff.c +++ b/builtin/diff.c @@ -203,8 +203,7 @@ static int builtin_diff_combined(struct rev_info *revs, revs->dense_combined_merges = revs->combine_merges = 1; for (i = 1; i < ents; i++) oid_array_append(&parents, &ent[i].item->oid); - diff_tree_combined(&ent[0].item->oid, &parents, - revs->dense_combined_merges, revs); + diff_tree_combined(&ent[0].item->oid, &parents, revs); oid_array_clear(&parents); return 0; } -- cgit v1.2.3