git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Inconsistent exit code for `git grep --files-without-match` with `--quiet`

From
Anthony Sottile <asottile@umich.edu>
Date
Aug 15, 2017, 16:00 UTC
Message-ID
<CA+dzEBnvVFc2DotLBjAQudFJdSN3NMDAV=UTqzZdxCFTa_BkSQ@mail.gmail.com>
Using the latest revision of git:

$ ./git --version git version 2.14.GIT

$ ./git-grep --files-without-match nope -- blob.c; echo $? blob.c 0

$ ./git-grep --files-without-match --quiet nope -- blob.c; echo $? 1

I expect both to exit 0

Note that blob.c does not contain "nope", here is the revision I am using: https://github.com/git/git/blob/b3622a4ee94e4916cd05e6d96e41eeb36b941182/blob.c -- this file / case isn't special I just picked a reproduction that may be convenient for git developers.

Anthony
Message 1 of 1 in “Inconsistent exit code for `git grep --files-without-match` with `--quiet`”
  1. Anthony SottileAug 15, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.