From: Patrick Steinhardt <ps@pks.im>
To: Junio C Hamano <gitster@pobox.com>
Cc: Eric Sunshine <ericsunshine@charter.net>,
git@vger.kernel.org, Eric Sunshine <ericsunshine@gmail.com>,
Eric Sunshine <sunshine@sunshineco.com>
Subject: Re: [PATCH] tests: drop dependency on `git diff` in check-chainlint
Date: Fri, 15 Dec 2023 06:36:06 +0100 [thread overview]
Message-ID: <ZXvlxqsCV9GJ7580@tanuki> (raw)
In-Reply-To: <xmqqo7esohjm.fsf@gitster.g>
[-- Attachment #1: Type: text/plain, Size: 1541 bytes --]
On Thu, Dec 14, 2023 at 08:49:49AM -0800, Junio C Hamano wrote:
> Patrick Steinhardt <ps@pks.im> writes:
> > This strongly reminds me of the thread at [1], where a similar issue was
> > discussed for git-grep(1). Quoting Junio:
> >
> >> I actually do not think these "we are allowing Git tools to be used
> >> on random garbage" is a good idea to begin with X-<. If we invented
> >> something nice for our variant in "git grep" and wish we can use it
> >> outside the repository, contributing the feature to implementations
> >> of "grep" would have been the right way to move forward, instead of
> >> contaminating the codebase with things that are not related to Git.
> >
> > So this might not be the best way to go.
>
> That is not a conclusion I want people to draw.
>
> Like it or not, "git diff --no-index" will be with us to stay, and
> "--no-index" being "we have abused the rest of Git code to implement
> 'diff' that works _outside_ a Git repository---now go and do your
> thing", we would eventually want to correct it, if it is misbehaving
> when a repository it finds is in a shape it does not like, no?
>
> We should have what you quoted in mind as a general principle, and
> think twice when we are tempted to hoard useful features for another
> tool we initially wrote for Git and allow them to be used with the
> "--no-index" option, instead of contributing them to the tool that
> does not know or care "git" repositories (like "diff" and "grep").
Okay, thanks for clarifying!
Patrick
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2023-12-15 5:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-14 3:22 [PATCH] tests: drop dependency on `git diff` in check-chainlint Eric Sunshine
2023-12-14 8:05 ` Patrick Steinhardt
2023-12-14 8:31 ` Eric Sunshine
2023-12-14 16:49 ` Junio C Hamano
2023-12-15 5:36 ` Patrick Steinhardt [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=ZXvlxqsCV9GJ7580@tanuki \
--to=ps@pks.im \
--cc=ericsunshine@charter.net \
--cc=ericsunshine@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=sunshine@sunshineco.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).