From: Beat Bolli <dev+git@drbeat.li>
To: git@vger.kernel.org
Cc: gitster@pobox.com, peff@peff.net, larsxschneider@gmail.com,
Jeff Hostetler <jeffhost@microsoft.com>
Subject: Re: [PATCH v1] msvc: fix non-standard escape sequence in source
Date: Tue, 24 Jul 2018 20:13:00 +0200 [thread overview]
Message-ID: <e443fe24-e072-d11c-a6b0-53e7de8a7f5c@drbeat.li> (raw)
In-Reply-To: <20180724144249.2857-1-git@jeffhostetler.com>
Hi Jeff
On 24.07.18 16:42, git@jeffhostetler.com wrote:
> From: Jeff Hostetler <jeffhost@microsoft.com>
>
> Replace non-standard "\e" escape sequence with "\x1B".
This was already fixed in <20180708144342.11922-4-dev+git@drbeat.li>.
Cheers,
Beat
>
> In commit 7a17918c34f4e83982456ffe22d880c3cda5384f a trace message with
> several "\e" escape sequences was added. This causes a compiler warning
> under MSVC.
>
> According to [1], the "\e" sequence is an extension supported by GCC,
> clang, and tcc.
>
> [1] https://en.wikipedia.org/wiki/Escape_sequences_in_C
>
> Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
> ---
> convert.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/convert.c b/convert.c
> index 56cfe31..52092be 100644
> --- 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",
> i,
> (unsigned char) buf[i],
> (buf[i] > 32 && buf[i] < 127 ? buf[i] : ' '),
>
next prev parent reply other threads:[~2018-07-24 18:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-24 14:42 [PATCH v1] msvc: fix non-standard escape sequence in source git
2018-07-24 17:33 ` Eric Sunshine
2018-07-24 18:03 ` Junio C Hamano
2018-07-24 18:13 ` Beat Bolli [this message]
2018-07-25 12:30 ` Jeff Hostetler
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e443fe24-e072-d11c-a6b0-53e7de8a7f5c@drbeat.li \
--to=dev+git@drbeat.li \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jeffhost@microsoft.com \
--cc=larsxschneider@gmail.com \
--cc=peff@peff.net \
/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.
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 NNTP newsgroup(s).