docs: Explain the purpose of fetch's and pull's <refspec> parameter.
Signed-off-by: Marc Branchaud <marcnarc@xiplink.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Marc Branchaud committed
Jun 11, 2014 at 10:24 UTC
db4e4113ea33ece52c5988f9b9f7c0559c802602
2 files changed
+16
-6
Documentation/git-fetch.txt
+2
-2
@@ -51,8 +51,8 @@ include::pull-fetch-param.txt[]
51
include::urls-remotes.txt[]
52
53
54
-CONFIGURED REMOTE-TRACKING BRANCHES
55
------------------------------------
54
+CONFIGURED REMOTE-TRACKING BRANCHES[[CRTB]]
55
+-------------------------------------------
56
57
You often interact with the same remote repository by
58
regularly and repeatedly fetching from it. In order to keep track
Documentation/pull-fetch-param.txt
+14
-4
@@ -12,10 +12,20 @@ ifndef::git-pull[]
12
endif::git-pull[]
13
14
<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.
29
+
30
`tag <tag>` means the same as `refs/tags/<tag>:refs/tags/<tag>`;
31
it requests fetching everything up to the given tag.