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

Re: [PATCH] t5601: exercise clones with "includeIf.*.onbranch"

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 12, 2024, 20:38 UTC
Message-ID
<xmqqo7bjjid9.fsf@gitster.g>
In-Reply-To
<0bede59a53862585c49bc635f82e44e983144a7f.1710246859.git.ps@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 11 quoted lines
> +test_expect_success 'clone with includeIf' '
> +	test_when_finished "rm -rf repo \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\"" &&
> +	git clone --bare --no-local src "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
> +
> +	test_when_finished "rm \"$HOME\"/.gitconfig" &&
> +	cat >"$HOME"/.gitconfig <<-EOF &&
> +	[includeIf "onbranch:something"]
> +		path = /does/not/exist.inc
> +	EOF
> +	git clone $HTTPD_URL/smart/repo.git repo
> +'

Hmph, isn't the end-user expectation more like if you clone with "git clone -b something" then the configuration stored in the named file to take effect, while "git clone" that would never place you on that something branch would ignore that missing file? Is this only the latter half of the pair?

Thanks.
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 7 of 10 in “[BUG] cannot git clone with includeif onbranch”
  1. Angelo DureghelloMar 8, 2024
  2. brian m. carlsonMar 8, 2024
  3. Angelo DureghelloMar 8, 2024
  4. rsbecker@nexbridge.comMar 8, 2024
  5. Patrick SteinhardtMar 11, 2024
  6. t5601: exercise clones with "includeIf.*.onbranch"Patrick Steinhardt, Mar 12, 2024
  7. Junio C HamanoMar 12, 2024
  8. Patrick SteinhardtMar 22, 2024
  9. Junio C HamanoMar 22, 2024
  10. Patrick SteinhardtMar 22, 2024

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.