All of lore.kernel.org
 help / color / mirror / Atom feed
From: Drew Noakes <drew@drewnoakes.com>
To: git@vger.kernel.org
Subject: Multiple consecutive null bytes with log -z --name-only
Date: Fri, 27 Jul 2018 21:20:54 +0100	[thread overview]
Message-ID: <CAJd66x7ZHn=6AHFRXo5E4MhzEiW98Mpf37JRWv_18U5eYFeVJg@mail.gmail.com> (raw)

[-- 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 --]

             reply	other threads:[~2018-07-27 20:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-27 20:20 Drew Noakes [this message]
2018-07-27 22:12 ` Multiple consecutive null bytes with log -z --name-only Junio C Hamano

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='CAJd66x7ZHn=6AHFRXo5E4MhzEiW98Mpf37JRWv_18U5eYFeVJg@mail.gmail.com' \
    --to=drew@drewnoakes.com \
    --cc=git@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.