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

Re: [PATCH] test-lib: respect GIT_TEST_INSTALLED when querying default hash

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 15, 2025, 21:27 UTC
Message-ID
<xmqqv7ntf8ks.fsf@gitster.g>
In-Reply-To
<pull.2011.git.git.1752605874596.gitgitgadget@gmail.com>
"Kyle Lippincott via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 14 quoted lines
>  ################################################################
>  # It appears that people try to run tests without building...
> -"${GIT_TEST_INSTALLED:-$GIT_BUILD_DIR}/git$X" >/dev/null
> +GIT_BINARY="${GIT_TEST_INSTALLED:-$GIT_BUILD_DIR}/git$X"
> +"$GIT_BINARY" >/dev/null
>  if test $? != 1
>  then
>  	if test -n "$GIT_TEST_INSTALLED"
> @@ -536,7 +537,7 @@ export GIT_COMMITTER_EMAIL GIT_COMMITTER_NAME
>  export GIT_COMMITTER_DATE GIT_AUTHOR_DATE
>  export EDITOR
>  
> -GIT_TEST_BUILTIN_HASH=$("$GIT_BUILD_DIR/git" version --build-options | sed -ne 's/^default-hash: //p')
> +GIT_TEST_BUILTIN_HASH=$("$GIT_BINARY" version --build-options | sed -ne 's/^default-hash: //p')
Very nice.  I very much like the way this reuses what we detected earlier.
Thanks, will queue.
Show 5 quoted lines
>  GIT_DEFAULT_HASH="${GIT_TEST_DEFAULT_HASH:-$GIT_TEST_BUILTIN_HASH}"
>  export GIT_DEFAULT_HASH
>  GIT_DEFAULT_REF_FORMAT="${GIT_TEST_DEFAULT_REF_FORMAT:-files}"
>
> base-commit: e9779f64349fbcc8d177d055208039877316e652
Previous: Kyle Lippincott via GitGitGadgetNext: Justin Tobler
Message 2 of 3 in “test-lib: respect GIT_TEST_INSTALLED when querying default hash”
  1. test-lib: respect GIT_TEST_INSTALLED when querying default hashKyle Lippincott via GitGitGadget, Jul 15, 2025
  2. Junio C HamanoJul 15, 2025
  3. Justin ToblerJul 15, 2025

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.