From: Jonathan Nieder <jrnieder@gmail.com>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [PATCH] Documentation/log: fix description of format.pretty
Date: Mon, 12 Nov 2012 07:38:55 -0800 [thread overview]
Message-ID: <20121112153855.GA3546@elie.Belkin> (raw)
In-Reply-To: <CALkWK0nR_9mWDKzKygR379x3L=d4bGKKo27AP-2Y=+coc7H+sQ@mail.gmail.com>
Ramkumar Ramachandra wrote:
> Oops, I read about `--pretty` in pretty-formats.txt and didn't realize
> that `--format` existed. However, your patch is still wrong because
> there seems to be a subtle (and confusing) difference between
> `--pretty` and `--format`. In the latter, you can't omit the format,
> and expect it to be picked up from format.pretty:
>
> $ git log --format
> fatal: unrecognized argument: --format
You can do
$ git log
and format.pretty will still take effect. In other words, setting
format.pretty to "foo" is somewhat like making
$ git log
do
$ git log --format=foo
which is what the text is supposed to explain. It is based on the
following text from Documentation/config.txt:
format.pretty::
The default pretty format for log/show/whatchanged command,
See linkgit:git-log[1], linkgit:git-show[1],
linkgit:git-whatchanged[1].
I do imagine it can be made clearer. s/--format/--pretty/ does not go
far enough --- it only replaces one confusing explanation with
another.
Hoping that clarifies,
Jonathan
next prev parent reply other threads:[~2012-11-12 15:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-11 11:27 [PATCH] Documentation/log: fix description of format.pretty Ramkumar Ramachandra
2012-11-12 8:05 ` Jonathan Nieder
2012-11-12 9:39 ` Ramkumar Ramachandra
2012-11-12 15:38 ` Jonathan Nieder [this message]
2012-11-12 17:42 ` 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=20121112153855.GA3546@elie.Belkin \
--to=jrnieder@gmail.com \
--cc=artagnon@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).