]> Kevux Git Server - rit/commit
remerge-diff: clean up temporary objdir at a central place
authorJunio C Hamano <gitster@pobox.com>
Fri, 9 Aug 2024 22:31:35 +0000 (15:31 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 9 Aug 2024 22:42:40 +0000 (15:42 -0700)
commit4460e052e074490cfc083703fba285d3c2e36560
treea1bb816c177c11188c68f0b8b337e8859afffd6d
parent245cac5c3312b9afab5c47cb222f0e5d1845da0d
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 <gitster@pobox.com>
12 files changed:
builtin/describe.c
builtin/diff-files.c
builtin/diff-index.c
builtin/diff-tree.c
builtin/diff.c
builtin/log.c
builtin/stash.c
builtin/submodule--helper.c
diff-no-index.c
diff.c
diff.h
wt-status.c