All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lucian Poston <lucian.poston@gmail.com>
To: "Zbigniew Jędrzejewski-Szmek" <zbyszek@in.waw.pl>
Cc: git@vger.kernel.org,
	Johannes Schindelin <johannes.schindelin@gmx.de>,
	Michael J Gruber <git@drmicha.warpmail.net>,
	Junio C Hamano <gitster@pobox.com>,
	Bo Yang <struggleyb.nku@gmail.com>
Subject: Re: [PATCH v2 2/3] Adjust stat width calculations to take --graph output into account
Date: Thu, 22 Mar 2012 21:38:54 -0700	[thread overview]
Message-ID: <CACz_eycFU564bz1aO6-QF3=6GV8oHvGYfMWHRfgT1-j9AcAX-g@mail.gmail.com> (raw)
In-Reply-To: <4F6B8B59.4010106@in.waw.pl>

2012/3/22 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>:
> On 03/22/2012 08:27 PM, Lucian Poston wrote:
>>
>> The recent change to compute the width of diff --stat did not take into
>> consideration the output from --graph. The consequence is that when both
>> options are used, e.g. in 'log --stat --graph', the lines are too long.
>>
>> Adjust stat width calculations to take --graph output into account.
>
> (1)
>
>> Adjust stat width calculations to reserve space for required characters
>> before
>> scaling the widths for the filename and graph portions of the diff-stat.
>> For
>> example, consider:
>>
>> " diff.c |   66 ++-"
>>
>> Before calculating the widths allocated to the filename, "diff.c", and the
>> graph, "++-", reserve space for the initial " " and the part between the
>> filename and graph portions " |   66 ". Then, divide the remaining space
>> so
>> that 5/8ths is given to the filename and 3/8ths for the graph.
>
> (2)
>
> Hi,
>
> I think that (1) is good. It fixes the bug and even makes the code more
> readable. But (2) should be separated, IMHO... There was a motivation for
> the layout in 1b058bc30df5f: not changing previous behaviour ("... at least
> 5/8 of available space is devoted to filenames. On a standard 80 column
> terminal, or if not connected to a terminal and using the default of 80
> columns, this gives the same partition as before.").
> (2) would change the way format-patch --stat output looks, which probably is
> not wanted.

I suppose changing the format of format-patch --stat output could be
annoying to anyone expecting it to remain unchanged. I'll update the
patch so that the diff-stat output using the default of 80 columns
remains unmodified.

  reply	other threads:[~2012-03-23  4:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-22 19:27 [PATCH v2 1/3] Add output_prefix_length to diff_options Lucian Poston
2012-03-22 19:27 ` [PATCH v2 2/3] Adjust stat width calculations to take --graph output into account Lucian Poston
2012-03-22 20:28   ` Zbigniew Jędrzejewski-Szmek
2012-03-23  4:38     ` Lucian Poston [this message]
2012-03-22 20:45   ` Junio C Hamano
2012-03-23  4:44     ` Lucian Poston
2012-03-23  5:54   ` Lucian Poston
2012-03-23 10:12     ` Zbigniew Jędrzejewski-Szmek
2012-04-12  7:47       ` Lucian Poston
2012-04-12 10:17         ` Zbigniew Jędrzejewski-Szmek
2012-04-16 11:04           ` Lucian Poston
2012-03-23 18:13     ` Junio C Hamano
2012-04-12  8:35       ` Lucian Poston
2012-03-22 19:27 ` [PATCH v2 3/3] t4052: Test that stat width is adjusted for prefixes Lucian Poston
2012-03-23  5:57   ` Lucian Poston

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACz_eycFU564bz1aO6-QF3=6GV8oHvGYfMWHRfgT1-j9AcAX-g@mail.gmail.com' \
    --to=lucian.poston@gmail.com \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johannes.schindelin@gmx.de \
    --cc=struggleyb.nku@gmail.com \
    --cc=zbyszek@in.waw.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.