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

Re: [PATCH 2/5] tests: respect GIT_TEST_INSTALLED when initializing repositories

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 14, 2018, 14:59 UTC
Message-ID
<xmqqa7mbn1r4.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<nycvar.QRO.7.76.6.1811141413170.39@tvgsbejvaqbjf.bet>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 5 quoted lines
> It would make sense, but we don't know how to get that information, do we?
> ...
> And changing the code *now* to let us query Git where it thinks its
> templates should be won't work, as this patch is about using the installed
> Git (at whatever pre-compiled version that might be).

It won't work, but we can add something like "git var templatedir" to help those who want to further improve the test-installed mode next year, preparing for better future by sowing seeds now.

In the meantime, using the same temlate dir as before is probably the best we can do. Two and a half tangential thoughts are:

 - But then, we need to make sure $GIT_BUILD_DIR/templates/blt/
   is populated, if we do rely on them (i.e. we probably want to
   make sure we have built).
 - Yet, once installed, the contents of the templatedir can be
   arbitrarily munged by the end user, so anything that depends on
   what is in the template won't work as a reliable test piece.
 - Among what's in templates/blt/, we explicitly disable hooks at
   the beginning of the test repository creation to ensure no hooks
   interfere what we test by default, but we will get affected by
   what is in info/excludes.  The contents of freshly-built one is
   empty, so it is unlikely that this will cause problems, but if we
   use installed templates, we cannot control what's in there,
   letting the tests get affected to random things the end-user
   happens to have.

So after all, if we were to change anything, it might make better sense not to install anything from any templatedir.

But of course, that is orthogonal to the test-install mode. If we want to make the test more robust by emptying the templates, we should do that also for the test-freshly-baked mode, too.

Previous: Johannes SchindelinNext: Jeff King
Message 9 of 27 in “tests: various improvements to the GIT_TEST_INSTALLED feature”
  1. 0/5 tests: various improvements to the GIT_TEST_INSTALLED featureJohannes Schindelin via GitGitGadget, Nov 12, 2018
  2. 1/5 tests: fix GIT_TEST_INSTALLED's PATH to include t/helper/Johannes Schindelin via GitGitGadget, Nov 12, 2018
  3. Junio C HamanoNov 14, 2018
  4. 3/5 t/lib-gettext: test installed git-sh-i18n if GIT_TEST_INSTALLED is setJohannes Schindelin via GitGitGadget, Nov 12, 2018
  5. Junio C HamanoNov 14, 2018
  6. 2/5 tests: respect GIT_TEST_INSTALLED when initializing repositoriesJohannes Schindelin via GitGitGadget, Nov 12, 2018
  7. Junio C HamanoNov 14, 2018
  8. Johannes SchindelinNov 14, 2018
  9. Junio C HamanoNov 14, 2018
  10. Jeff KingNov 14, 2018
  11. Johannes SchindelinNov 15, 2018
  12. Jeff KingNov 15, 2018
  13. 4/5 tests: do not require Git to be built when testing an installed GitJohannes Schindelin via GitGitGadget, Nov 12, 2018
  14. Junio C HamanoNov 14, 2018
  15. Johannes SchindelinNov 14, 2018
  16. Jeff KingNov 14, 2018
  17. Johannes SchindelinNov 14, 2018
  18. 5/5 tests: explicitly use `git.exe` on WindowsJohannes Schindelin via GitGitGadget, Nov 12, 2018
  19. Junio C HamanoNov 14, 2018
  20. Johannes SchindelinNov 14, 2018
  21. Junio C HamanoNov 14, 2018
  22. 0/5 tests: various improvements to the GIT_TEST_INSTALLED featureJohannes Schindelin via GitGitGadget, Nov 14, 2018
  23. 1/5 tests: fix GIT_TEST_INSTALLED's PATH to include t/helper/Johannes Schindelin via GitGitGadget, Nov 14, 2018
  24. 2/5 tests: respect GIT_TEST_INSTALLED when initializing repositoriesJohannes Schindelin via GitGitGadget, Nov 14, 2018
  25. 3/5 t/lib-gettext: test installed git-sh-i18n if GIT_TEST_INSTALLED is setJohannes Schindelin via GitGitGadget, Nov 14, 2018
  26. 4/5 tests: do not require Git to be built when testing an installed GitJohannes Schindelin via GitGitGadget, Nov 14, 2018
  27. 5/5 tests: explicitly use `git.exe` on WindowsJohannes Schindelin via GitGitGadget, Nov 14, 2018

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.