summaryrefslogtreecommitdiffstats
path: root/builtin/diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-08-10 00:31:35 +0200
committerJunio C Hamano <gitster@pobox.com>2024-08-10 00:42:40 +0200
commit4460e052e074490cfc083703fba285d3c2e36560 (patch)
treea1bb816c177c11188c68f0b8b337e8859afffd6d /builtin/diff.c
parentremerge-diff: lazily prepare temporary objdir on demand (diff)
downloadgit-4460e052e074490cfc083703fba285d3c2e36560.tar.xz
git-4460e052e074490cfc083703fba285d3c2e36560.zip
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>
Diffstat (limited to 'builtin/diff.c')
-rw-r--r--builtin/diff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/diff.c b/builtin/diff.c
index 6e196e0c7d..a5834704aa 100644
--- a/builtin/diff.c
+++ b/builtin/diff.c
@@ -605,7 +605,7 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
builtin_diff_combined(&rev, argc, argv,
ent.objects, ent.nr,
first_non_parent);
- result = diff_result_code(&rev.diffopt);
+ result = diff_result_code(&rev);
if (1 < rev.diffopt.skip_stat_unmatch)
refresh_index_quietly();
release_revisions(&rev);