git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
* Subject: Encoding of git diff --name-only stdout
@ 2021-04-06 12:20 Andrey Bienkowski
  2021-04-06 14:54 ` Jeff King
  0 siblings, 1 reply; 2+ messages in thread
From: Andrey Bienkowski @ 2021-04-06 12:20 UTC (permalink / raw)
  To: git

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.
-- Andrey Bienkowski

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Subject: Encoding of git diff --name-only stdout
  2021-04-06 12:20 Subject: Encoding of git diff --name-only stdout Andrey Bienkowski
@ 2021-04-06 14:54 ` Jeff King
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff King @ 2021-04-06 14:54 UTC (permalink / raw)
  To: Andrey Bienkowski; +Cc: git

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-06 14:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-06 12:20 Subject: Encoding of git diff --name-only stdout Andrey Bienkowski
2021-04-06 14:54 ` Jeff King

git@vger.kernel.org list mirror (unofficial, one of many)

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 git git/ https://public-inbox.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.io/gmane.comp.version-control.git
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git