From: Junio C Hamano <gitster@pobox•com>
To: git@vger•kernel.org
Cc: Elijah Newren <newren@gmail•com>, blanet <bupt_xingxin@163•com>,
Xing Xin <xingxin.xx@bytedance•com>
Subject: Re: [PATCH 2/2] remerge-diff: clean up temporary objdir at a central place
Date: Sun, 11 Aug 2024 22:17:26 -0700 [thread overview]
Message-ID: <xmqqbk1y8gm1.fsf@gitster.g> (raw)
In-Reply-To: <xmqqr0ax9vlk.fsf@gitster.g> (Junio C. Hamano's message of "Fri, 09 Aug 2024 15:31:35 -0700")
Junio C Hamano <gitster@pobox•com> writes:
> 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>
> ---
I forgot to add that I am not happy with this "centralized tear
down" step, even though I am reasonably happy with the "lazy set-up"
step. I wonder why the remerge-diff related members have to exist
in the rev_info structure in the first place, instead of being in
the diffopt structure? Moving them to diffopt may make the end
result much more pleasant to read.
next prev parent reply other threads:[~2024-08-12 5:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-09 22:30 [PATCH 1/2] remerge-diff: lazily prpare temporary objdir on demand Junio C Hamano
2024-08-09 22:31 ` [PATCH 2/2] remerge-diff: clean up temporary objdir at a central place Junio C Hamano
2024-08-12 5:17 ` Junio C Hamano [this message]
2024-08-16 6:19 ` Elijah Newren
2024-09-08 21:16 ` Junio C Hamano
2024-08-09 22:37 ` [PATCH 1/2] remerge-diff: lazily prpare temporary objdir on demand Eric Sunshine
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqbk1y8gm1.fsf@gitster.g \
--to=gitster@pobox$(echo .)com \
--cc=bupt_xingxin@163$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=newren@gmail$(echo .)com \
--cc=xingxin.xx@bytedance$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox