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 09:39:17 -0800	[thread overview]
Message-ID: <xmqq8uh47xkq.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:

> Unfortunately, "--format" seems to be parsed as ("--pretty" and
> therefore?) "--pretty=tformat:" which I consider a bug.

"tformat:" was introduced to fix "format:, because many people found
the latter hard to use, probably because most of the time they
wanted to use the feature to show one-line-per-commit and a LF after
each record ("terminator semantics" where 't' in "tformat:" comes
from) made more sense in that context, compared to a LF between each
record ("delimiter semantics").

Of course, "format:" that uses the delimiter semantics has its uses;
after all, the delimiter semantics is what is used for canned
formats, other than --oneline.

It was a deliberate design decision to make "--format=<string>" as a
short-hand for "--pretty=tformat:<string>", favouring "tformat:"
over "format:", AFAIK.  To use the facility to show a break between
each (likely multi-line) record, use "--pretty=format:<string>", not
"--pretty=tformat:<string>" aka "--format=<string>".

  reply	other threads:[~2015-01-15 17:39 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 [this message]
2015-01-15 19:25   ` Junio C Hamano

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=xmqq8uh47xkq.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