git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/2] remerge-diff: clean up temporary objdir at a central place

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 12, 2024, 05:17 UTC
Message-ID
<xmqqbk1y8gm1.fsf@gitster.g>
In-Reply-To
<xmqqr0ax9vlk.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 19 quoted lines
> 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.

Previous: Junio C HamanoNext: Elijah Newren
Message 3 of 6 in “remerge-diff: lazily prpare temporary objdir on demand”
  1. 1/2 remerge-diff: lazily prpare temporary objdir on demandJunio C Hamano, Aug 9, 2024
  2. 2/2 remerge-diff: clean up temporary objdir at a central placeJunio C Hamano, Aug 9, 2024
  3. Junio C HamanoAug 12, 2024
  4. Elijah NewrenAug 16, 2024
  5. Junio C HamanoSep 8, 2024
  6. Eric SunshineAug 9, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.