From: Jeff King <peff@peff.net>
To: Prasad Deshpande <prasadgdeshpande@yahoo.com>
Cc: Junio C Hamano <gitster@pobox.com>,
"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: git log --quiet bug?
Date: Tue, 8 Nov 2011 16:29:30 -0500 [thread overview]
Message-ID: <20111108212930.GA18529@sigill.intra.peff.net> (raw)
In-Reply-To: <1320762978.3614.YahooMailNeo@web84005.mail.mud.yahoo.com>
On Tue, Nov 08, 2011 at 06:36:18AM -0800, Prasad Deshpande wrote:
> I am seeing a bug with git log --quiet. It doesn't seem to be quiet
> :-). Also I have seen cases where the exit status returned is not
> correct i.e. its 0 even if there is some output (although I cant seem
> to reproduce that problem at present).
I think the description of "--quiet" in the git-log manpage is
accidentally inherited by including the diff options. In "git diff", it
stops output and makes the exit code useful for determining whether
there were changes. But what does the exit code even mean in the context
of "git log"?
It does look like there is code in "git log" to handle --quiet, and
convert it to "no diff output" (i.e., like "-s"). But it doesn't seem to
do anything. If I manually specify a format like "git log -p --quiet", I
still get output. And if I don't say "-p", then I wouldn't get diff
output anyway. It does seem to have an impact on other log variants that
have output by default (e.g., "git whatchanged --quiet" won't show the
usual raw diffs).
I think we should probably just excise it from the git-log manpage, like
this:
-- >8 --
Subject: [PATCH] docs: don't mention --quiet or --exit-code in git-log(1)
These are diff-options, but they don't actually make sense
in the context of log.
Signed-off-by: Jeff King <peff@peff.net>
---
Documentation/diff-options.txt | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 08b581f..9f7cba2 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -412,15 +412,17 @@ endif::git-format-patch[]
--function-context::
Show whole surrounding functions of changes.
ifndef::git-format-patch[]
+ifndef::git-log[]
--exit-code::
Make the program exit with codes similar to diff(1).
That is, it exits with 1 if there were differences and
0 means no differences.
--quiet::
Disable all output of the program. Implies `--exit-code`.
+endif::git-log[]
endif::git-format-patch[]
--ext-diff::
Allow an external diff helper to be executed. If you set an
--
1.7.7.2.7.g9f96f
next prev parent reply other threads:[~2011-11-08 21:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-08 14:36 git log --quiet bug? Prasad Deshpande
2011-11-08 21:29 ` Jeff King [this message]
2011-11-08 21:37 ` Junio C Hamano
[not found] ` <1320791465.67359.YahooMailNeo@web84006.mail.mud.yahoo.com>
2011-11-08 23:20 ` Jeff King
2011-11-09 0:04 ` Junio C Hamano
2011-11-09 0:59 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111108212930.GA18529@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=prasadgdeshpande@yahoo.com \
/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 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 NNTP newsgroup(s).