From: Jeff King <peff@peff.net>
To: Andrey Bienkowski <hexagonrecursion@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Subject: Encoding of git diff --name-only stdout
Date: Tue, 6 Apr 2021 10:54:08 -0400 [thread overview]
Message-ID: <YGx2EMHnwXWbp4ET@coredump.intra.peff.net> (raw)
In-Reply-To: <CAAunPhfjUSO0Po4sO7Hwxjq7_p0ke7VOD=XRizG1Fqkzymcgmg@mail.gmail.com>
On Tue, Apr 06, 2021 at 12:20:45PM +0000, Andrey Bienkowski wrote:
> Hi. I want to parse the output of git diff --name-only and git diff
> --name-status, but the documentation https://git-scm.com/docs/git-diff
> does not say what encoding it is in. Is it always utf8 on all
> platforms? If not is there a flag to make it so? Once I get an answer
> to this question I'll submit a PR to add the missing documentation.
There's some discussion in Documentation/i18n.txt, which is included in
various manpages (e.g., https://git-scm.com/docs/git-log#_discussion)
but it doesn't seem to be mentioned in git-diff.
The short answer is: mostly utf8, but historically on platforms that
don't care (like Linux) you could get away with other encodings.
-Peff
prev parent reply other threads:[~2021-04-06 14:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-06 12:20 Subject: Encoding of git diff --name-only stdout Andrey Bienkowski
2021-04-06 14:54 ` Jeff King [this message]
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=YGx2EMHnwXWbp4ET@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=hexagonrecursion@gmail.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).