Skip to content

Commit db4e411

Browse files
marcnarcgitster
authored andcommitted
docs: Explain the purpose of fetch's and pull's <refspec> parameter.
Signed-off-by: Marc Branchaud <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c5558f8 commit db4e411

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

Documentation/git-fetch.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ include::pull-fetch-param.txt[]
5151
include::urls-remotes.txt[]
5252

5353

54-
CONFIGURED REMOTE-TRACKING BRANCHES
55-
-----------------------------------
54+
CONFIGURED REMOTE-TRACKING BRANCHES[[CRTB]]
55+
-------------------------------------------
5656

5757
You often interact with the same remote repository by
5858
regularly and repeatedly fetching from it. In order to keep track

Documentation/pull-fetch-param.txt

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,20 @@ ifndef::git-pull[]
1212
endif::git-pull[]
1313

1414
<refspec>::
15-
The format of a <refspec> parameter is an optional plus
16-
`+`, followed by the source ref <src>, followed
17-
by a colon `:`, followed by the destination ref <dst>.
18-
The colon can be omitted when <dst> is empty.
15+
Specifies which refs to fetch and which local refs to update.
16+
When no <refspec>s appear on the command line, the refs to fetch
17+
are read from `remote.<repository>.fetch` variables instead
18+
ifndef::git-pull[]
19+
(see <<CRTB,CONFIGURED REMOTE-TRACKING BRANCHES>> below).
20+
endif::git-pull[]
21+
ifdef::git-pull[]
22+
(see linkgit:git-fetch[1]).
23+
endif::git-pull[]
24+
+
25+
The format of a <refspec> parameter is an optional plus
26+
`+`, followed by the source ref <src>, followed
27+
by a colon `:`, followed by the destination ref <dst>.
28+
The colon can be omitted when <dst> is empty.
1929
+
2030
`tag <tag>` means the same as `refs/tags/<tag>:refs/tags/<tag>`;
2131
it requests fetching everything up to the given tag.

0 commit comments

Comments
 (0)