From 245cac5c3312b9afab5c47cb222f0e5d1845da0d Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 9 Aug 2024 15:30:51 -0700 Subject: remerge-diff: lazily prepare temporary objdir on demand It is error prone for each caller that sets revs.remerge_diff bit to be responsible for preparing a temporary object directory and rotate it into the list of alternate object stores, making it the primary object store. Instead, remove the code to set up and arrange the temporary object directory from the current callers and implement it in the code that runs remerge-diff logic. The code to undo the futzing of the list of alternate object store is still spread across the callers, but we will deal with it in future steps. Signed-off-by: Junio C Hamano --- builtin/log.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'builtin/log.c') diff --git a/builtin/log.c b/builtin/log.c index af6403cb71..227823a16e 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -494,13 +494,6 @@ static int cmd_log_walk_no_free(struct rev_info *rev) int saved_nrl = 0; int saved_dcctc = 0; - if (rev->remerge_diff) { - rev->remerge_objdir = tmp_objdir_create("remerge-diff"); - if (!rev->remerge_objdir) - die(_("unable to create temporary object directory")); - tmp_objdir_replace_primary_odb(rev->remerge_objdir, 1); - } - if (rev->early_output) setup_early_output(); -- cgit v1.2.3