All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Mike Hommey <mh@glandium.org>
Cc: Francis Moreau <francis.moro@gmail.com>,
	Shawn Bohrer <shawn.bohrer@gmail.com>,
	git@vger.kernel.org
Subject: Re: Confusion about diffing branches
Date: Mon, 27 Aug 2007 10:06:21 -0700	[thread overview]
Message-ID: <7vr6lozz3m.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20070827133314.GA9131@glandium.org> (Mike Hommey's message of "Mon, 27 Aug 2007 15:33:14 +0200")

Mike Hommey <mh@glandium.org> writes:

> On Mon, Aug 27, 2007 at 03:21:32PM +0200, Francis Moreau <francis.moro@gmail.com> wrote:
>> 
>> This "inconsistency" had already been raised before. Please refer to:
>> http://www.gelato.unsw.edu.au/archives/git/0612/35354.html
>> 
>> I shared and still share your feeling about that but it seems that
>> Junio and Linus don't...
>
> Actually, they may have a good point, cf. the thread you point.
> But it is annoying that it is not documented.

Would something like this reduce the annoyance factor?

---

 Documentation/git-diff.txt |   20 +++++++++++++++++---
 1 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt
index b36e705..04b62d9 100644
--- a/Documentation/git-diff.txt
+++ b/Documentation/git-diff.txt
@@ -42,14 +42,28 @@ tree and the index file, or the index file and the working tree.
 	branch name to compare with the tip of a different
 	branch.
 
-'git-diff' [--options] <commit> <commit> [--] [<path>...]::
+'git-diff' [--options] <commit1> <commit2> [--] [<path>...]::
 
 	This form is to view the changes between two <commit>,
 	for example, tips of two branches.
 
+'git-diff' [--options] <commit1>..<commit2> [--] [<path>...]::
+
+	This is identical to the previous one, just to make the
+	specification of two commits look similar to a commit
+	range notation.
+
+'git-diff' [--options] <commit1>...<commit2> [--] [<path>...]::
+
+	This compares the merge base of two commits and the
+	second commit.  Useful to view what happened in the
+	history that leads to the second commit since that
+	history forked from the history that leads to the first
+	commit.
+
 Just in case if you are doing something exotic, it should be
-noted that all of the <commit> in the above description can be
-any <tree-ish>.
+noted that all of the <commit> in the above description,
+except for the last two variants, can be any <tree-ish>.
 
 For a more complete list of ways to spell <commit>, see
 "SPECIFYING REVISIONS" section in gitlink:git-rev-parse[1].

  reply	other threads:[~2007-08-27 17:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-26 23:35 Confusion about diffing branches Shawn Bohrer
2007-08-27  0:18 ` Junio C Hamano
2007-08-27  1:40   ` Shawn Bohrer
2007-08-27  6:25     ` Mike Hommey
2007-08-27  7:07     ` Junio C Hamano
2007-08-27  7:50       ` Mike Hommey
2007-08-27 13:21         ` Francis Moreau
2007-08-27 13:33           ` Mike Hommey
2007-08-27 17:06             ` Junio C Hamano [this message]
2007-08-27 17:24               ` Mike Hommey
2007-08-27 17:05           ` Theodore Tso
2007-08-27 17:20             ` Junio C Hamano
2007-08-27 20:29               ` Theodore Tso
2007-08-27 22:20     ` Jakub Narebski

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=7vr6lozz3m.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=francis.moro@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=mh@glandium.org \
    --cc=shawn.bohrer@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.