summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-11-25 04:29:42 +0100
committerJunio C Hamano <gitster@pobox.com>2024-11-25 04:29:42 +0100
commit5f380e40177d21e27e248f1ecfc72a3adb71accf (patch)
treed60805a8069bf60d7aae20139ae489d114a013a2
parentMerge branch 'js/doc-platform-support-link-fix' into maint-2.47 (diff)
parentdoc: clarify <src> in refspec syntax (diff)
downloadgit-5f380e40177d21e27e248f1ecfc72a3adb71accf.tar.xz
git-5f380e40177d21e27e248f1ecfc72a3adb71accf.zip
Merge branch 'jc/doc-refspec-syntax' into maint-2.47
Doc updates. * jc/doc-refspec-syntax: doc: clarify <src> in refspec syntax
-rw-r--r--Documentation/pull-fetch-param.txt7
1 files changed, 4 insertions, 3 deletions
diff --git a/Documentation/pull-fetch-param.txt b/Documentation/pull-fetch-param.txt
index c718f7946f..d79d2f6065 100644
--- a/Documentation/pull-fetch-param.txt
+++ b/Documentation/pull-fetch-param.txt
@@ -25,14 +25,15 @@ endif::git-pull[]
+
The format of a <refspec> parameter is an optional plus
`+`, followed by the source <src>, followed
-by a colon `:`, followed by the destination ref <dst>.
+by a colon `:`, followed by the destination <dst>.
The colon can be omitted when <dst> is empty. <src> is
-typically a ref, but it can also be a fully spelled hex object
+typically a ref, or a glob pattern with a single `*` that is used
+to match a set of refs, but it can also be a fully spelled hex object
name.
+
A <refspec> may contain a `*` in its <src> to indicate a simple pattern
match. Such a refspec functions like a glob that matches any ref with the
-same prefix. A pattern <refspec> must have a `*` in both the <src> and
+pattern. A pattern <refspec> must have one and only one `*` in both the <src> and
<dst>. It will map refs to the destination by replacing the `*` with the
contents matched from the source.
+