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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> 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.





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux