git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] tests: prefer host Git to verify chainlint self-checks

From
Patrick Steinhardt <ps@pks.im>
Date
Dec 13, 2023, 07:20 UTC
Message-ID
<ZXlbNlG28e1sAYPU@tanuki>
In-Reply-To
<xmqq8r5zrzg1.fsf@gitster.g>
On Tue, Dec 12, 2023 at 11:30:22AM -0800, Junio C Hamano wrote:
Show 23 quoted lines
> 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
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 21 in “tests: prefer host Git to verify chainlint self-checks”
  1. tests: prefer host Git to verify chainlint self-checksPatrick Steinhardt, Dec 12, 2023
  2. Junio C HamanoDec 12, 2023
  3. Patrick SteinhardtDec 13, 2023
  4. Junio C HamanoDec 13, 2023
  5. Eric SunshineDec 14, 2023
  6. Patrick SteinhardtDec 14, 2023
  7. Eric SunshineDec 14, 2023
  8. Patrick SteinhardtDec 14, 2023
  9. Junio C HamanoDec 14, 2023
  10. Eric SunshineDec 14, 2023
  11. Junio C HamanoDec 14, 2023
  12. Patrick SteinhardtDec 15, 2023
  13. tests: adjust whitespace in chainlint expectationsPatrick Steinhardt, Dec 14, 2023
  14. Eric SunshineDec 14, 2023
  15. tests: adjust whitespace in chainlint expectationsPatrick Steinhardt, Dec 15, 2023
  16. Eric SunshineDec 15, 2023
  17. Patrick SteinhardtDec 15, 2023
  18. Eric SunshineDec 15, 2023
  19. tests: adjust whitespace in chainlint expectationsPatrick Steinhardt, Dec 15, 2023
  20. Eric SunshineDec 15, 2023
  21. Junio C HamanoDec 15, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.