From 4460e052e074490cfc083703fba285d3c2e36560 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 9 Aug 2024 15:31:35 -0700 Subject: remerge-diff: clean up temporary objdir at a central place After running a diff between two things, or a series of diffs while walking the history, the diff computation is concluded by a call to diff_result_code() to extract the exit status of the diff machinery. The function can work on "struct diffopt", but all the callers historically and currently pass "struct diffopt" that is embedded in the "struct rev_info" that is used to hold the remerge_diff bit and the remerge_objdir variable that points at the temporary object directory in use. Redefine diff_result_code() to take the whole "struct rev_info" to give it an access to these members related to remerge-diff, so that it can get rid of the temporary object directory for any and all callers that used the feature. We can lose the equivalent code to do so from the code paths for individual commands, diff-tree, diff, and log. Signed-off-by: Junio C Hamano --- builtin/diff-index.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin/diff-index.c') diff --git a/builtin/diff-index.c b/builtin/diff-index.c index 3e05260ac0..560c099524 100644 --- a/builtin/diff-index.c +++ b/builtin/diff-index.c @@ -71,7 +71,7 @@ int cmd_diff_index(int argc, const char **argv, const char *prefix) return -1; } run_diff_index(&rev, option); - result = diff_result_code(&rev.diffopt); + result = diff_result_code(&rev); release_revisions(&rev); return result; } -- cgit v1.2.3