From: Junio C Hamano <gitster@pobox.com>
To: Han-Wen Nienhuys <hanwen@google.com>
Cc: Eric Sunshine <sunshine@sunshineco.com>,
Jonathan Nieder <jrn@google.com>, git <git@vger.kernel.org>
Subject: Re: [PATCH v5 2/2] sideband: highlight keywords in remote sideband output
Date: Mon, 06 Aug 2018 10:51:37 -0700 [thread overview]
Message-ID: <xmqq36vrpemu.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <CAFQ2z_Nrj5WhzYsxr6P5qLJ3pDVFzB4UDb9g4P-5U99wrAuB0w@mail.gmail.com> (Han-Wen Nienhuys's message of "Mon, 6 Aug 2018 19:42:05 +0200")
Han-Wen Nienhuys <hanwen@google.com> writes:
>> I think the code is OK without any assert() or BUG(), and that is
>> because the design is "we just paint the keyword at the beginning of
>> what the other side of the sideband wants us to show as a single
>> unit". If the other side sends a payload with an embedded LF in a
>> single packet, that's their choice and we are free not to paint the
>> beginning of the second line after that LF. So from that point of
>> view, perhaps we shouldn't even talk about "a single line only".
>
> I don't understand this remark. Isn't the call to strpbrk() meant to
> split the input on line endings?
Yes, but that happens only for band #2 and not band #3, to which
this coloring also applies if I am reading your changes correctly.
And I still think not splitting band #3 packet into lines and
painting only the beginning of the first line is perfectly OK.
>> > #define ANSI_SUFFIX "\033[K"
>> > -#define DUMB_SUFFIX " "
>> > +#define DUMB_SUFFIX " "
>> >
>>
>> Was this change intended and if so for what purpose? I can drop
>> this hunk if this is a mere finger-slip without proofreading, but I
>> do not want to do so without making sure I am not missing anything
>> and not discarding a meaningful change.
>
> This was my poor use of the tabify function.
OK, so I can drop this hunk---eh, perhaps v6 won't have it so I
won't have to worry about it ;-)
Thanks.
next prev parent reply other threads:[~2018-08-06 17:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-06 14:33 [PATCH v5 0/2] sideband: highlight keywords in remote sideband output Han-Wen Nienhuys
2018-08-06 14:33 ` [PATCH v5 1/2] config: document git config getter return value Han-Wen Nienhuys
2018-08-06 16:32 ` Junio C Hamano
2018-08-06 16:40 ` Han-Wen Nienhuys
2018-08-06 14:33 ` [PATCH v5 2/2] sideband: highlight keywords in remote sideband output Han-Wen Nienhuys
2018-08-06 17:21 ` Junio C Hamano
2018-08-06 17:42 ` Han-Wen Nienhuys
2018-08-06 17:51 ` Junio C Hamano [this message]
2018-08-06 17:46 ` Han-Wen Nienhuys
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq36vrpemu.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=hanwen@google.com \
--cc=jrn@google.com \
--cc=sunshine@sunshineco.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).