Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Michael J Gruber <git@drmicha.warpmail.net>
Cc: Francesc Zacarias <francesc@spotify.com>, git@vger.kernel.org
Subject: Re: cosmetic bug: "git show --pretty:format" produces different output than "git show --format"
Date: Thu, 15 Jan 2015 11:25:47 -0800	[thread overview]
Message-ID: <xmqqegqv7sn8.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <54B7E98B.6020907@drmicha.warpmail.net> (Michael J. Gruber's message of "Thu, 15 Jan 2015 17:23:39 +0100")

Michael J Gruber <git@drmicha.warpmail.net> writes:

> The first part of the man page is a bit sloppy, but refers to the FORMAT
> section. There, it says that "--pretty" is equivalent to
> "--pretty=tformat:" which is different from "--pretty=format:".

It is indeed sloppy.  It says --(pretty|format)=<format> can take
these canned <format>s or 'format:<string>', but

 - it does not say it can also take 'tformat:<string>' at all; and

 - it does not say a <format> that is none of the above is dwimmed
   with 'tformat:' prefixed.

Perhaps something like this is needed.


 Documentation/pretty-options.txt | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/Documentation/pretty-options.txt b/Documentation/pretty-options.txt
index 8569e29..7e17af9 100644
--- a/Documentation/pretty-options.txt
+++ b/Documentation/pretty-options.txt
@@ -3,9 +3,13 @@
 
 	Pretty-print the contents of the commit logs in a given format,
 	where '<format>' can be one of 'oneline', 'short', 'medium',
-	'full', 'fuller', 'email', 'raw' and 'format:<string>'.  See
-	the "PRETTY FORMATS" section for some additional details for each
-	format.  When omitted, the format defaults to 'medium'.
+	'full', 'fuller', 'email', 'raw', 'format:<string>'
+	and 'tformat:<string>'.  When '<format>' is none of the above,
+	acts as if '--pretty=tformat:<format>' were given.
++
+See
+the "PRETTY FORMATS" section for some additional details for each
+format.  When omitted, the format defaults to 'medium'.
 +
 Note: you can specify the default pretty format in the repository
 configuration (see linkgit:git-config[1]).

      parent reply	other threads:[~2015-01-15 19:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-15 13:55 cosmetic bug: "git show --pretty:format" produces different output than "git show --format" Francesc Zacarias
2015-01-15 16:23 ` Michael J Gruber
2015-01-15 17:39   ` Junio C Hamano
2015-01-15 19:25   ` Junio C Hamano [this message]

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=xmqqegqv7sn8.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=francesc@spotify.com \
    --cc=git@drmicha.warpmail.net \
    --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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox