Re: [PATCH v4 1/2] diff: add --line-prefix option for passing in a prefix
- From
Jacob Keller <jacob.keller@gmail.com>
- Date
- Aug 11, 2016, 18:30 UTC
- Message-ID
- <CA+P7+xqodtUt9gPzZ5HxPurFy67niN5+-EDOTJpraNrvLJfZ=Q@mail.gmail.com>
- In-Reply-To
- <xmqqh9ar2pc7.fsf@gitster.mtv.corp.google.com>
On Thu, Aug 11, 2016 at 10:22 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 20 quoted lines
> -- >8 -- > Subject: diff.c: remove output_prefix_length field > > "diff/log --stat" has a logic that determines the display columns > available for the diffstat part of the output and apportions it for > pathnames and diffstat graph automatically. > > 5e71a84a (Add output_prefix_length to diff_options, 2012-04-16) > added the output_prefix_length field to diff_options structure to > allow this logic subtract the display columns used for display the > history graph part from the total "terminal width"; this matters > when the "git log --graph -p" option is in use. > > The field be set to the number of display columns needed to show the > output from the output_prefix() callback. Any new output_prefix() > callback must also update the field accordingly, which is error > prone. As there is only one user of the field, and the user has the > actual value of the prefix string, let's get rid of the field and > have the user count the display width itself. >
Seems correct to me.
Thanks, Jake