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

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

 



On Mon, Aug 6, 2018 at 1:45 PM Han-Wen Nienhuys <hanwen@xxxxxxxxxx> wrote:
> The colorization is controlled with the config setting "color.remote".
> [...]
> Helped-by: Duy Nguyen <pclouds@xxxxxxxxx>
> Signed-off-by: Han-Wen Nienhuys <hanwen@xxxxxxxxxx>
> ---
> 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/

> +       `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?

> +               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);
>         }



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

  Powered by Linux