# [BUG] git check-ignore --help doesn't cover -z/--stdin conflict

1 messages from 2026-04-26 to 2026-04-26. Participants: David Le.
Thread: https://gitlist.dev/t/65553

## David Le, 2026-04-26 11:28

Subject: [BUG] git check-ignore --help doesn't cover -z/--stdin conflict
Message-ID: <CADEXOKpTG99=o33do0R8Dc=k6YkgT-mg+nufDQrW-b2s+eFRhA@mail.gmail.com>

```
Hi all,

Just reporting a minor issue between check-ignore and its docs.

What did you do before the bug happened? (Steps to reproduce your issue)

- Be in a git repo so check-ignore will succeed
- Run git check-ignore -z <pathname>...

What did you expect to happen? (Expected behavior)

The command should work, printing the ignored paths out of those given,
delimited by NUL characters.

What happened instead? (Actual behavior)

git check-ignore -z <pathname>... fails with:
    fatal: -z only makes sense with --stdin

Anything else you want to add:

Currently git check-ignore --help implies that -z works independently of
--stdin (specifically, "If --stdin is also given"):

   -z
       The output format is modified to be machine-parsable (see below).
       If --stdin is also given, input paths are separated with a NUL
       character instead of a linefeed character.

Either patching the quoted documentation to match check-ignore, or vice
versa, makes sense to me.

[System Info]
git version:
git version 2.54.0
cpu: x86_64
built from commit: 94f057755b7941b321fd11fec1b2e3ca5313a4e0
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
rust: enabled
gettext: enabled
libcurl: 8.19.0
OpenSSL: OpenSSL 3.6.2 7 Apr 2026
zlib-ng: 2.3.3
SHA-1: SHA1_DC
SHA-256: SHA256_BLK
default-ref-format: files
default-hash: sha1
uname: Linux 6.19.12-arch1-1 #1 SMP PREEMPT_DYNAMIC Sat, 11 Apr 2026
22:36:29 +0000 x86_64
compiler info: gnuc: 15.2
libc info: glibc: 2.43
$SHELL (typically, interactive shell): /usr/bin/bash


[Enabled Hooks]

---
pynappo

```
