git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Multiple consecutive null bytes with log -z --name-only
@ 2018-07-27 20:20 Drew Noakes
  2018-07-27 22:12 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Drew Noakes @ 2018-07-27 20:20 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 748 bytes --]

Hi all,

I'm a developer on the Git Extensions project [1] and am looking at an
issue parsing the output of `git log` in that application.

Some investigation suggests that a certain combination of arguments causes
multiple consecutive null bytes between rows, where I would ordinarily
expect one.

Passing -z with --name-only causes double nulls.

$ git log -z --pretty=format:"%H" --name-only | grep -obUaP "\x00\x00" | wc
-l
8994
$ git log -z --pretty=format:"%H" | grep -obUaP "\x00\x00" | wc -l
0

We can work around this issue, but I would like to understand if it's a bug
or if there's some information to be gleaned here.

$ git --version
git version 2.18.0.windows.1

Many thanks,

Drew

[1] https://github.com/gitextensions/gitextensions

[-- Attachment #2: Type: text/html, Size: 1146 bytes --]

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

end of thread, other threads:[~2018-07-27 22:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-27 20:20 Multiple consecutive null bytes with log -z --name-only Drew Noakes
2018-07-27 22:12 ` Junio C Hamano

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).