Re: [PATCH] Documentation: More on --pretty with git-diff-tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano wrote:
> Jakub Narebski <jnareb@xxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux