From: Junio C Hamano <gitster@pobox.com>
To: Jacob Keller <jacob.keller@gmail.com>
Cc: Jacob Keller <jacob.e.keller@intel.com>, git@vger.kernel.org
Subject: Re: [PATCH RFC] diff --no-index: teach option to exclude files by pattern
Date: Thu, 15 May 2025 11:09:46 -0700 [thread overview]
Message-ID: <xmqqtt5lzqxh.fsf@gitster.g> (raw)
In-Reply-To: <CA+P7+xqg3S0q=n3nrTUJJuYicooDm83Q32AkpzRt1u7rH3n3Pw@mail.gmail.com> (Jacob Keller's message of "Thu, 15 May 2025 09:27:45 -0700")
Jacob Keller <jacob.keller@gmail.com> writes:
> I guess the one weirdness is that pathspecs must come after the first
> 2 arguments, since we need to find 2 paths first. But this matches the
> way that treeish must come first in git diff-tree -r takes treeish and
> then pathspecs, and you can't re-order them arbitrarily either.
>
> Does this sound like a reasonable extension to the existing 2 argument
> form of git diff --no-index?
Absolutely.
Or you could even use "--" convention in the examples you would
write in the documentation, even though you may not absolutely need
it for the purpose of parsing the command line, to highlight the
fact that two things to be compared is given and then with an
optional pathspec after the two things, e.g.,
$ git diff --no-index git-1.6.0 git-2.43.0 -- Documentation/
or something silly like that.
next prev parent reply other threads:[~2025-05-15 18:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-14 20:40 [PATCH RFC] diff --no-index: teach option to exclude files by pattern Jacob Keller
2025-05-14 21:10 ` Junio C Hamano
2025-05-15 16:27 ` Jacob Keller
2025-05-15 18:09 ` Junio C Hamano [this message]
2025-05-15 20:24 ` Jacob Keller
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=xmqqtt5lzqxh.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jacob.e.keller@intel.com \
--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;
as well as URLs for NNTP newsgroup(s).