From: Junio C Hamano <gitster@pobox.com>
To: Patrick Steinhardt <ps@pks.im>
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: Thu, 14 Dec 2023 08:49:49 -0800 [thread overview]
Message-ID: <xmqqo7esohjm.fsf@gitster.g> (raw)
In-Reply-To: <ZXq3YdK2RSKF3npE@tanuki> (Patrick Steinhardt's message of "Thu, 14 Dec 2023 09:05:53 +0100")
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").
next prev parent reply other threads:[~2023-12-14 16:49 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 [this message]
2023-12-15 5:36 ` Patrick Steinhardt
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=xmqqo7esohjm.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=ericsunshine@charter.net \
--cc=ericsunshine@gmail.com \
--cc=git@vger.kernel.org \
--cc=ps@pks.im \
--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).