git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v6 1/1] sideband: highlight keywords in remote sideband output

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Aug 6, 2018, 18:58 UTC
Message-ID
<CAPig+cScb_7s4a_ZSVCsr+nBxAHGHZVMZOtnrOgbhZUi96-VFA@mail.gmail.com>
In-Reply-To
<20180806174459.199589-2-hanwen@google.com>
On Mon, Aug 6, 2018 at 1:45 PM Han-Wen Nienhuys <hanwen@google.com> wrote:
Show 11 quoted lines
> The colorization is controlled with the config setting "color.remote".
> [...]
> Helped-by: Duy Nguyen <pclouds@gmail.com>
> Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
> ---
> diff --git a/Documentation/config.txt b/Documentation/config.txt
> @@ -1263,6 +1263,18 @@ color.push::
> +color.remote::
> +       If set, keywords at the start of the line are highlighted. The
> +       keywords are "error", "warning", "hint" and "success", and are
> +       matched case-insensitively. Maybe set to `always`, `false` (or
s/Maybe/May be/
Show 8 quoted lines
> +       `never`) or `auto` (or `true`). If unset, then the value of
> +       `color.ui` is used (`auto` by default).
> diff --git a/sideband.c b/sideband.c
> +static void maybe_colorize_sideband(struct strbuf *dest, const char *src, int n)
> +{
> +       if (!want_color_stderr(use_sideband_colors())) {
> +               strbuf_add(dest, src, n);
> +               fprintf(stderr, "added: '%s'\n", dest->buf);
Debugging gunk?
Show 5 quoted lines
> +               return;
> +       }
> @@ -96,6 +204,7 @@ int recv_sideband(const char *me, int in_stream, int out)
>         if (outbuf.len) {
> +               fprintf(stderr, "last bit '%s'\n", outbuf.buf);
Debugging gunk?
>                 strbuf_addch(&outbuf, '\n');
>                 xwrite(2, outbuf.buf, outbuf.len);
>         }
Previous: Han-Wen Nienhuys
Message 3 of 3 in “sideband: highlight keywords in remote sideband output”
  1. 0/1 sideband: highlight keywords in remote sideband outputHan-Wen Nienhuys, Aug 6, 2018
  2. 1/1 sideband: highlight keywords in remote sideband outputHan-Wen Nienhuys, Aug 6, 2018
  3. Eric SunshineAug 6, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.