git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robert Watson <robert.oo.watson@gmail.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: git@vger.kernel.org, Junio C Hamano <junkio@cox.net>
Subject: Re: command to show diff of a commit
Date: Fri, 23 Sep 2005 11:06:04 +0100	[thread overview]
Message-ID: <72499e3b05092303062a466e37@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0509220820011.2553@g5.osdl.org>

On 9/22/05, Linus Torvalds <torvalds@osdl.org> wrote:
>
>
> On Thu, 22 Sep 2005, Robert Watson wrote:
> >
> > I am wondering what is the best way to show the change introduced by a
> > commit. In the other words, is there a better way to do this:
> >
> > git-diff b163512d4eb36ee946908b682c7863658c5a8db4^
> > b163512d4eb36ee946908b682c7863658c5a8db4
>
> Oh, absolutely.
>
> Do
>
>         git-diff-tree -p --pretty b163512d4eb36ee946908b682c7863658c5a8db4
>
> and you're done.
>
> If you _just_ want the diff (and not the message), skip the "--pretty".
>
>                 Linus
>

Many thanks.  I know there must be a way to do this.

Here is a patch to make the document a bit clearer.

Regards,
Robertoo

diff --git a/Documentation/git-diff-tree.txt b/Documentation/git-diff-tree.txt
--- a/Documentation/git-diff-tree.txt
+++ b/Documentation/git-diff-tree.txt
@@ -9,12 +9,15 @@ git-diff-tree - Compares the content and

 SYNOPSIS
 --------
-'git-diff-tree' [--stdin] [-m] [-s] [-v] [--pretty] [-t] [<common
diff options>] <tree-ish> <tree-ish> [<path>...]
+'git-diff-tree' [--stdin] [-m] [-s] [-v] [--pretty] [-t] [<common
diff options>] <tree-ish> [<tree-ish>] [<path>...]

 DESCRIPTION
 -----------
 Compares the content and mode of the blobs found via two tree objects.

+If there is only one <tree-ish> given, the commit is compared with its parents
+(see --stdin below).
+
 Note that "git-diff-tree" can use the tree encapsulated in a commit object.

 OPTIONS

      reply	other threads:[~2005-09-23 10:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-22  9:58 command to show diff of a commit Robert Watson
2005-09-22 10:04 ` Petr Baudis
2005-09-22 14:25   ` Robert Watson
2005-09-22 14:33     ` Sven Verdoolaege
2005-09-22 15:20 ` Linus Torvalds
2005-09-23 10:06   ` Robert Watson [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=72499e3b05092303062a466e37@mail.gmail.com \
    --to=robert.oo.watson@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=torvalds@osdl.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).