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

From: Junio C Hamano <[email-masked]>
Date: Tue, 12 Mar 2024 13:38:26 -0700

Patrick Steinhardt <[email-masked]> writes:

> +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.