From: Patrick Steinhardt <ps@pks.im>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Eric Sunshine <sunshine@sunshineco.com>
Subject: Re: [PATCH] tests: prefer host Git to verify chainlint self-checks
Date: Wed, 13 Dec 2023 08:20:22 +0100 [thread overview]
Message-ID: <ZXlbNlG28e1sAYPU@tanuki> (raw)
In-Reply-To: <xmqq8r5zrzg1.fsf@gitster.g>
[-- Attachment #1: Type: text/plain, Size: 2052 bytes --]
On Tue, Dec 12, 2023 at 11:30:22AM -0800, Junio C Hamano wrote:
> Patrick Steinhardt <ps@pks.im> writes:
>
> > To accomodate for cases where the host system has no Git installation we
> > use the locally-compiled version of Git. This can result in problems
> > though when the Git project's repository is using extensions that the
> > locally-compiled version of Git doesn't understand. It will refuse to
> > run and thus cause the checks to fail.
> >
> > Fix this issue by prefering the host's Git resolved via PATH. If it
> > doesn't exist, then we fall back to the locally-compiled Git version and
> > diff as before.
> >
> > Signed-off-by: Patrick Steinhardt <ps@pks.im>
> > ---
> >
> > I've started to dogfood the reftable backend on my local machine and
> > have converted many repositories to use the reftable backend. This
> > surfaced the described issue because the repository now sets up the
> > "extensions.refStorage" extension, and thus "check-chainlint" fails
> > depending on which versions of Git I'm trying to compile and test.
>
> I do not think "prefer host Git" is necessarily a good idea; falling
> back to use host Git is perfectly fine, of course.
Why is that, though? We already use host Git in other parts of our build
infra, and the options we pass to git-diff(1) have been around for ages:
- `--no-pager` was introduced in 463a849d00 (Add and document a global
--no-pager option for git., 2007-08-19).
- `--no-index` is around since at least fcfa33ec90 (diff: make more
cases implicit --no-index, 2007-02-25).
- `-w` is around since 0d21efa51c (Teach diff about -b and -w flags,
2006-06-14).
So all options have pretty much been there since forever. Which means
that if the host has Git around, and the Git version is at least v1.5.3,
then it also understands all options.
Furthermore, we are accessing the Git repository that the user has set
up with host Git in the first place, so I'd think even conceptually it
is the correct thing to do.
Patrick
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2023-12-13 7:20 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-12 11:32 [PATCH] tests: prefer host Git to verify chainlint self-checks Patrick Steinhardt
2023-12-12 19:30 ` Junio C Hamano
2023-12-13 7:20 ` Patrick Steinhardt [this message]
2023-12-13 15:11 ` Junio C Hamano
2023-12-14 3:33 ` Eric Sunshine
2023-12-14 8:13 ` Patrick Steinhardt
2023-12-14 8:39 ` Eric Sunshine
2023-12-14 8:40 ` Patrick Steinhardt
2023-12-14 16:16 ` Junio C Hamano
2023-12-14 18:10 ` Eric Sunshine
2023-12-14 19:13 ` Junio C Hamano
2023-12-15 5:33 ` Patrick Steinhardt
2023-12-14 8:30 ` [PATCH v2] tests: adjust whitespace in chainlint expectations Patrick Steinhardt
2023-12-14 8:44 ` Eric Sunshine
2023-12-15 6:04 ` [PATCH v3] " Patrick Steinhardt
2023-12-15 6:24 ` Eric Sunshine
2023-12-15 6:29 ` Patrick Steinhardt
2023-12-15 6:40 ` Eric Sunshine
2023-12-15 6:42 ` [PATCH v4] " Patrick Steinhardt
2023-12-15 7:17 ` Eric Sunshine
2023-12-15 16:44 ` Junio C Hamano
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=ZXlbNlG28e1sAYPU@tanuki \
--to=ps@pks.im \
--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).