Re: [PATCH v2] diff: ensure consistent diff behavior with -I<regex> across output formats

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

 



Lidong Yan <yldhome2d2@xxxxxxxxx> writes:

> I’m proposing to add a .diff_optimize field to struct diff_options, which
> would support three modes: DIFF_OPT_NONE, DIFF_OPT_DRY_RUN,
> and DIFF_OPT_BUFFER. The appropriate value would be determined
> before calling diff_flush(), potentially in repo_diff_setup().
> ...
> However, I’m concerned that DIFF_OPT_BUFFER could lead to high memory
> usage in Git, and I’m not entirely sure if this trade-off is justified.

The DRY_RUN mode would make very good sense, and I agree with you
that it is better to leave the BUFFER mode out.  It is hard to do
right (like, keeping up to certain small amount of diff in memory
and then spill it to an external temporary file if we are getting
too much), and the value to have it is questionable, especially in
the initial attempt.

Thanks.




[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