Subject: Re: [PATCH v4 2/2] branch: add 'branch.namePrefix' config param

From: Junio C Hamano <[email-masked]>
Date: Thu, 09 Apr 2026 13:02:31 -0700

"VALERI Yoann via GitGitGadget" <[email-masked]> writes:

> +test_expect_success 'create branch with config prefix' '
> +	test_config branch.autosetupmerge false &&
> +	test_config branch.namePrefix blob &&
> +	git branch -- -with-prefix &&
> +	test_ref_exists refs/heads/blob-with-prefix &&

Another thing I noticed.

Wouldn't you rather want to have a mechanism where the user does not
have to prefix the end-user supplied value ("with-prefix" in this
case) without leading dash?  From the look of what you are trying to
configure with the variable, the desire seems to be to allow the
user to make many branches that share the same prefix, so
conceptually, among blob-master, blob-maint, blob-feature branches
that would result in "git branch $name" where name is taken from the
vocabulary (master, maint, feature), the responsibility to supply
the word-separating hyphen belongs to either the prefix side (i.e.,
"blob-") or the mechanism that does prefising (i.e., the prefix
configuration @{current} comes up with a prefix string "blob", and
with the end-user supplied value of "with-prefix", the mechanism
that pastes these two strings makes the result "blob-with-prefix",
supplying the hyphen between "blob" and "with-prefix".

I said that I am negative in my previous message, simply because I
didn't get the intended use case at all, but even if there were a
good use case explained in future messages to make me change my
mind, I doubt that a design that requires the hyphen in front of
"with-prefix" the end-user is supposed to supply is a good thing to
have.

Thanks.