From: Junio C Hamano <gitster@pobox.com>
To: Michael J Gruber <git@drmicha.warpmail.net>
Cc: git@vger.kernel.org, Jacob Keller <jacob.keller@gmail.com>
Subject: Re: [PATCH] Documentation/git-diff: document git diff with 3+ commits
Date: Thu, 27 Oct 2016 11:40:50 -0700 [thread overview]
Message-ID: <xmqqvawd63f1.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <e74d4d84-d848-00be-8ca5-75204cf47262@drmicha.warpmail.net> (Michael J. Gruber's message of "Thu, 27 Oct 2016 11:27:14 +0200")
Michael J Gruber <git@drmicha.warpmail.net> writes:
> It did not exist, but even at that point in time, "git log A..B" listed
> only commits between the merge base and B, not those which are only in A
> and not in B. Whereas "git diff A B" shows the differences between the
> endpoints A and B.
I think you are speaking with 20/20 hindsight at this point.
Do you genuinely think you would have thought that way when there
weren't any concept of "merge-base" or "git log A...B" known to you?
>>> @@ -12,6 +12,7 @@ SYNOPSIS
>>> 'git diff' [options] [<commit>] [--] [<path>...]
>>> 'git diff' [options] --cached [<commit>] [--] [<path>...]
>>> 'git diff' [options] <commit> <commit> [--] [<path>...]
>>> +'git diff' [options] <commit> <commit> <commit> [<commit>...]
>>
>> Made me wonder "is [<A>...] 0-or-more As or 1-or-more As?".
>
> 0-or-more, at least that's the way it is used in all lines here.
>
>> Don't we allow pathspecs in this case?
>
> Yes, the combinded diff mode kicks in only with no blobs (not: no
> pathspec, which I had misread) and N>=3 commits. Maybe I should update
> the code comments in builtin/diff.c to describe this, too.
I don't know about the code comments, but the above SYNOPSIS needs
an update, I would think. That is why I wondered if [<A>...] were
0-or-more or 1-or-moer.
You can replace
>>> 'git diff' [options] <commit> <commit> [--] [<path>...]
with
>>> 'git diff' [options] <commit> <commit> [<commit>...] [--] [<path>...]
without adding a new line to cover the new(ly discovered) case.
prev parent reply other threads:[~2016-10-27 18:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-21 21:40 generating combined diff without an existing merge commit Jacob Keller
2016-10-21 22:01 ` Jacob Keller
2016-10-21 22:41 ` Junio C Hamano
2016-10-21 22:54 ` Jacob Keller
2016-10-26 9:11 ` [PATCH] Documentation/git-diff: document git diff with 3+ commits Michael J Gruber
2016-10-26 18:11 ` Junio C Hamano
2016-10-27 9:27 ` Michael J Gruber
2016-10-27 18:40 ` Junio C Hamano [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=xmqqvawd63f1.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=jacob.keller@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox