git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Documentation: More on --pretty with git-diff-tree
Date: Mon, 28 Apr 2008 00:18:35 +0200	[thread overview]
Message-ID: <200804280018.36470.jnareb@gmail.com> (raw)
In-Reply-To: <7vzlrfdmm4.fsf@gitster.siamese.dyndns.org>

Junio C Hamano wrote:
> Jakub Narebski <jnareb@gmail.com> writes:
> 
>> Mention that --pretty=<format> option is used by git-diff-tree only
>> if both --stdin and -v options are provided.

> There are two distinct uses for diff-tree, and by understanding it you
> would be freed from the confusion.
> 
>  * You can compare two arbitrary tree-ish, and because a commit is a
>    tree-ish, comparing two commits is a special case of this.  There is no
>    reason to expect commit logs to be shown in such a use, and formatting
>    options would naturally be ineffective.
> 
>  * You can give a commit and ask the command to give difference ``for the
>    commit'', in other words, the diff between its parent and the given
>    commit.  --stdin is a special case to drive this mechanism repeatedly,
>    one commit at a time.  This is showing the diff as one of the
>    characteristic of the commit, and allowing to show other attributes of
>    the commit such as its message and timestamp makes sense, so formatting
>    options take effect.

Sorry for the/my confusion.

It looks like gitweb's 'commitdiff' and 'commitdiff_plain' views
(actions), both of which can take _two_ commits, needs to be rethough.
Current output doesn't make much sense when the two commits in question
are not parent and child.  Also, simplifying 'commitdiff_plain' by using
git-diff-tree with --pretty=email cannot work with current gitweb's
commitdiff features.

By the way, can one choose one of parents to be shown in ''for the
commit'' mode, or it is only combined (-c, --cc) or all (-m)?
-- 
Jakub Narebski
Poland

  reply	other threads:[~2008-04-27 22:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-27 17:40 [PATCH] Documentation: More on --pretty with git-diff-tree Jakub Narebski
2008-04-27 21:16 ` Junio C Hamano
2008-04-27 22:18   ` Jakub Narebski [this message]
2008-04-28  1:39     ` 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=200804280018.36470.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).