Re: [PATCH v4 0/5] Better ref summary alignment in "git fetch"

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

 



On Thu, Jun 30, 2016 at 06:16:09PM +0200, Duy Nguyen wrote:

> > I've shrunk it a bit to fit in the email; my actual "long" name was much
> > larger. And the average length for the shorter ones is, too, but the
> > overall effect is the same; almost every line has a huge run of
> > whitespace. And some lines wrap that would not have even under the
> > normal, duplicated scheme.
> 
> I was about to resend with s/\$/*/g and ignored this issue (with a
> note) then it occurred to me we can simply ignore these long lines
> from column width calculation. Yeah such a line may still be wrapped
> around, but it will not push every other line to the far right. We
> already have code for that in adjust_refcol_width()
> 
>         max    = term_columns();
>         ...
>         /*
>         * rough estimation to see if the output line is too long and
>         * should not be counted (we can't do precise calculation
>         * anyway because we don't know if the error explanation part
>         * will be printed in update_local_ref)
>         */
>         if (21 /* flag and summary */ + rlen + 4 /* -> */ + llen >= max)
>                 return;
>         ...
> 
> we can limit max to, like, term_columns() / 2 (or 2/3 of
> term_columns). There's no perfect number, some people will still find
> the output ugly _often_. But hopefully the majority won't. What do you
> think?

Without having seen the output, my gut feeling is "meh". It will
hopefully avoid the wrapping, and it will reduce the size of the huge
whitespace gap, but not eliminate it. So I think it will still be
somewhat ugly.

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