git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Tad Hardesty <tad@platymuus.com>
To: git@vger.kernel.org
Subject: 'git status -z' missing separators on OSX
Date: Tue, 16 Jun 2015 18:21:56 -0500	[thread overview]
Message-ID: <5580AF94.6090801@platymuus.com> (raw)

I have been experiencing a problem where git on OSX prints incorrect
output to the `git status -z` command, where instead of NUL separators
records are simply not separated. This is causing problems with IDE
integration. While I have a workaround involving manually replacing \n
with \0, it would be nice to identify and fix the root issue.

Here's a terminal session showing the problem:
~$ mkdir test && cd test
~/test$ git init
Initialized empty Git repository in /Users/thardesty/test/.git/
~/test (master #)$ touch a b
~/test (master #)$ ls
a b
~/test (master #)$ git status -z | hexdump -C
00000000  3f 3f 20 61 3f 3f 20 62                           |?? a?? b|
00000008
~/test (master #)$ git add a b
~/test (master #)$ git status -z | hexdump -C
00000000  41 20 20 61 41 20 20 62                           |A  aA  b|
00000008
~/test (master #)$ git status --porcelain | hexdump -C
00000000  41 20 20 61 0a 41 20 20  62 0a                    |A  a.A  b.|
0000000a
~/test (master #)$ git --version
git version 2.4.3
~/test (master #)$ uname -a
Darwin HA002070 14.3.0 Darwin Kernel Version 14.3.0: Mon Mar 23 11:59:05
PDT 2015; root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64

As shown, --porcelain prints a newline but -z yields no separator at all.

The Mac is running OS X Yosemite 10.10.3. I have tried git 2.3.2 from
Apple, git 2.4.2 from brew, and git 2.4.3 from brew, git-scm.org, and
self-compiled, and these all exhibit the problem. Some helpful folks on
the #git IRC tried the commands for me and didn't see any problems, but
I temporarily blanked all my configuration files and that didn't help. I
double-checked and git on Linux has the correct behavior.

Thanks for any help.

             reply	other threads:[~2015-06-16 23:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-16 23:21 Tad Hardesty [this message]
2015-06-17  3:32 ` 'git status -z' missing separators on OSX Jeff King
2015-06-17 21:32   ` Eric Sunshine
  -- strict thread matches above, loose matches on Subject: below --
2015-06-17 14:07 Tad Hardesty
2015-06-17 19:17 ` Jeff King

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=5580AF94.6090801@platymuus.com \
    --to=tad@platymuus.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.
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).