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

Re: [PATCH v1] msvc: fix non-standard escape sequence in source

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Jul 24, 2018, 17:33 UTC
Message-ID
<CAPig+cSzJQS9PnHgEbyUpOAQGQgWJuwZDP7nsgBMECzy2C3wkQ@mail.gmail.com>
In-Reply-To
<20180724144249.2857-1-git@jeffhostetler.com>
On Tue, Jul 24, 2018 at 10:43 AM <git@jeffhostetler.com> wrote:
Show 5 quoted lines
> Replace non-standard "\e" escape sequence with "\x1B".
>
> In commit 7a17918c34f4e83982456ffe22d880c3cda5384f a trace message with
> several "\e" escape sequences was added.  This causes a compiler warning
> under MSVC.

Wrong commit. That code was actually introduced by 541d059cd9 (convert: add tracing for 'working-tree-encoding' attribute, 2018-04-15).

Show 7 quoted lines
> diff --git a/convert.c b/convert.c
> @@ -335,7 +335,7 @@ static void trace_encoding(const char *context, const char *path,
>         strbuf_addf(&trace, "%s (%s, considered %s):\n", context, path, encoding);
>         for (i = 0; i < len && buf; ++i) {
>                 strbuf_addf(
> -                       &trace,"| \e[2m%2i:\e[0m %2x \e[2m%c\e[0m%c",
> +                       &trace,"| \x1B[2m%2i:\x1B[0m %2x \x1B[2m%c\x1B[0m%c",
In this codebase, ESC is always spelled as octal \033 rather than hex \x1b.
Previous: git@jeffhostetler.comNext: Junio C Hamano
Message 2 of 5 in “msvc: fix non-standard escape sequence in source”
  1. msvc: fix non-standard escape sequence in sourcegit@jeffhostetler.com, Jul 24, 2018
  2. Eric SunshineJul 24, 2018
  3. Junio C HamanoJul 24, 2018
  4. Beat BolliJul 24, 2018
  5. Jeff HostetlerJul 25, 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.