Re: [PATCH v2 2/3] Adjust stat width calculations to take --graph output into account

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

 



2012/3/22 Junio C Hamano <gitster@xxxxxxxxx>:
> That explains the regression you are introducing, but does not justify it.
>
> When you start showing that line, do you already know how many columns at
> the left edge of the display will be consumed by the ancestry graph part?
>
> When the command is run without "--graph" option, the answer would
> obviously be zero, but if it is non-zero, wouldn't it be a more sensible
> solution to the problem to subtract that width from the total allowed
> display width (e.g. on 200-column terminal, if the ancestry graph part at
> the left edge uses 20-columns, you do exactly the same as the current
> algorithm but use 180 as the width of the terminal).  When --stat-width is
> explicitly given, that specifies the width of whatever comes after the
> ancestry graph part, so there is no need to change anything.
>
> Am I missing something, or is there something deeper going on?

The approach you describe would work. The only issue is the current
calculations slightly run off the rails when the number of columns is
less than 26 or so (or, similarly and more frequently, when the
difference between the terminal columns and ancestry graph columns is
less than ~26). To keep the diff-stat output (more or less)
unmodified, I'll simply add a conditional to address this case, rather
than my more drastic approach.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]