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

Bug in "git diff --quiet" handling.

From
PGPaul Gortmaker <paul.gortmaker@windriver.com>
Date
Apr 11, 2011, 21:07 UTC
Message-ID
<4DA36D95.6060108@windriver.com>

I came across this when I was mistakenly thinking I could use "--quiet" to stop the output of git format-patch giving the 0001-somecommit.patch names as it generated them.

It was then when I read the man page and found it is passed into git diff and is supposed to disable all output. The interesting thing, is that it only seems to do this on every other commit it format-patches, as shown below.

I'm assuming this is a bug, since I can't imagine what use case would have every alternate patch being output as useful. If I get a chance, I'll take a look at the code and see if I can figure out what is going on, but I figured I'd mention it 1st in case it triggered an "Oh yeah it is XYZ" in someones memory.

Paul.
---

Script started on Mon 11 Apr 2011 04:50:22 PM EDT paul@dv2000:~/git/git$ git --version git version 1.7.4.4 paul@dv2000:~/git/git$ git format-patch --quiet -o foo HEAD~10..HEAD paul@dv2000:~/git/git$ ls -l foo total 60 -rw-r--r-- 1 paul paul 2960 2011-04-11 16:50 0001-fetch-pull-recurse-into-submodules-when-necessary.patch -rw-r--r-- 1 paul paul 0 2011-04-11 16:50 0002-fetch-pull-Add-the-on-demand-value-to-the-recurse-su.patch -rw-r--r-- 1 paul paul 1514 2011-04-11 16:50 0003-config-teach-the-fetch.recurseSubmodules-option-the-.patch -rw-r--r-- 1 paul paul 0 2011-04-11 16:50 0004-Submodules-Add-on-demand-value-for-the-fetchRecurseS.patch -rw-r--r-- 1 paul paul 1391 2011-04-11 16:50 0005-fetch-pull-Don-t-recurse-into-a-submodule-when-commi.patch -rw-r--r-- 1 paul paul 0 2011-04-11 16:50 0006-submodule-update-Don-t-fetch-when-the-submodule-comm.patch -rw-r--r-- 1 paul paul 1381 2011-04-11 16:50 0007-fetch-pull-Describe-recurse-submodule-restrictions-i.patch -rw-r--r-- 1 paul paul 0 2011-04-11 16:50 0008-remote-disallow-some-nonsensical-option-combinations.patch -rw-r--r-- 1 paul paul 3801 2011-04-11 16:50 0009-remote-separate-the-concept-of-push-and-fetch-mirror.patch -rw-r--r-- 1 paul paul 0 2011-04-11 16:50 0010-remote-deprecate-mirror.patch -rw-r--r-- 1 paul paul 3172 2011-04-11 16:50 0011-submodule-process-conflicting-submodules-only-once.patch -rw-r--r-- 1 paul paul 0 2011-04-11 16:50 0012-revisions.txt-consistent-use-of-quotes.patch -rw-r--r-- 1 paul paul 9679 2011-04-11 16:50 0013-revisions.txt-structure-with-a-labelled-list.patch -rw-r--r-- 1 paul paul 0 2011-04-11 16:50 0014-log-cherry-pick-documentation-regression-fix.patch -rw-r--r-- 1 paul paul 1826 2011-04-11 16:50 0015-compat-add-missing-include-sys-resource.h.patch -rw-r--r-- 1 paul paul 0 2011-04-11 16:50 0016-pull-do-not-clobber-untracked-files-on-initial-pull.patch -rw-r--r-- 1 paul paul 1743 2011-04-11 16:50 0017-Start-preparing-for-1.7.4.4.patch -rw-r--r-- 1 paul paul 0 2011-04-11 16:50 0018-gitweb-Fix-parsing-of-negative-fractional-timezones-.patch -rw-r--r-- 1 paul paul 1089 2011-04-11 16:50 0019-Documentation-trivial-grammar-fix-in-core.worktree-d.patch -rw-r--r-- 1 paul paul 0 2011-04-11 16:50 0020-revisions.txt-language-improvements.patch -rw-r--r-- 1 paul paul 1114 2011-04-11 16:50 0021-Git-1.7.4.4.patch -rw-r--r-- 1 paul paul 0 2011-04-11 16:50 0022-Git-1.7.5-rc1.patch -rw-r--r-- 1 paul paul 4996 2011-04-11 16:50 0023-git-p4-replace-each-tab-with-8-spaces-for-consistenc.patch paul@dv2000:~/git/git$ exit exit Script done on Mon 11 Apr 2011 04:51:34 PM EDT

Next: Junio C Hamano
Message 1 of 17 in “Bug in "git diff --quiet" handling.”
  1. Paul GortmakerApr 11, 2011
  2. Junio C HamanoApr 11, 2011
  3. format-patch: don't pass on the --quiet flagCarlos Martín Nieto, Apr 12, 2011
  4. format-patch: document --quiet optionCarlos Martín Nieto, Apr 12, 2011
  5. Junio C HamanoApr 12, 2011
  6. Junio C HamanoApr 12, 2011
  7. Carlos Martín NietoApr 13, 2011
  8. Junio C HamanoApr 12, 2011
  9. Carlos Martín NietoApr 13, 2011
  10. whatchanged: always show the headerCarlos Martín Nieto, Apr 13, 2011
  11. Junio C HamanoApr 13, 2011
  12. Carlos Martín NietoApr 13, 2011
  13. log: convert to parse-optionsCarlos Martín Nieto, Apr 14, 2011
  14. Junio C HamanoApr 14, 2011
  15. log: convert to parse-options=?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?=, Apr 19, 2011
  16. Jeff KingApr 20, 2011
  17. Carlos Martín NietoApr 20, 2011

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.