]> git.ipfire.org Git - thirdparty/git.git/commit
doc: clarify <src> in refspec syntax
authorJunio C Hamano <gitster@pobox.com>
Tue, 1 Oct 2024 18:36:52 +0000 (11:36 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 9 Oct 2024 23:59:01 +0000 (16:59 -0700)
commit8ead1bba3ed54355524c8d8875fb3a16c05bd39a
tree5be3b02ae843cfd357fcc9342caa2c26b445216a
parent777489f9e09c8d0dd6b12f9d90de6376330577a2
doc: clarify <src> in refspec syntax

We explicitly avoid saying "ref <src>" when introducing the source
side of a refspec, because it can be a fully-spelled hexadecimal
object name, and it also can be a pattern that is not quite a "ref".

But we are loose when we introduce <dst> and say "ref <dst>", even
though it can also be a pattern.  Let's omit "ref" also from the
destination side.

Clarify that <src> can be a ref, a (limited glob) pattern, or an
object name.

Even though the very original design of refspec expected that '*'
was used only at the end (e.g., "refs/heads/*" was expected, but not
"refs/heads/*-wip"), the code and its use evolved to handle a single
'*' anywhere in the pattern.  Update the text to remove the mention
of "the same prefix".  Anything that matches the pattern are named
by such a (limited glob) pattern in <src>.

Also put a bit more stress on the fact that we accept only one '*'
in the pattern by saying "one and only one `*`".

Helped-by: Monika KairaitytÄ— <monika@kibit.lt>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/pull-fetch-param.txt