Thread (1 message) 1 message, 1 author, 2024-08-09

Re: [PATCH v2] diff-tree: fix crash when used with --remerge-diff

From: Junio C Hamano <hidden>
Date: 2024-08-09 15:46:11

Junio C Hamano [off-list ref] writes:
but I have to wonder if we do even better in a future follow-up
patch.
"if we do" -> "if we can do".
So wouldn't it work well if we

 (1) at the beginning of do_remerge_diff(), only once for a rev_info
     structure:
   (1-a) lazily do the "object directory rotation"
   (1-b) set up an atexit handler to clear the temporary object
         store
An atexit handler may not be enough, when a program wants to start
creating a real object after we did a remerge-diff but before
exiting. So we'd probably need to allow an explicit "ok, we are
done" clean-up call for such a program, too.

And the atexit handler can call the same clean-up function if the
program hasn't called it explicitly.  For logically read-only
operations like diff-tree, they do not have to worry about rotating
the real object store back to the primary status as soon as
possible.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help