Skip to content

Commit 5d59a32

Browse files
committed
fetch doc: on pulling multiple refspecs
Replace desription of old-style "Pull:" lines in remotes/ configuration with modern remote.*.fetch variables. As this note applies only to "git pull", enable it only in git-pull manual page. Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3630654 commit 5d59a32

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

Documentation/pull-fetch-param.txt

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,27 @@ will be needed for such branches. There is no way to
3434
determine or declare that a branch will be made available
3535
in a repository with this behavior; the pulling user simply
3636
must know this is the expected usage pattern for a branch.
37+
ifdef::git-pull[]
3738
+
3839
[NOTE]
3940
There is a difference between listing multiple <refspec>
4041
directly on 'git pull' command line and having multiple
41-
`Pull:` <refspec> lines for a <repository> and running
42+
`remote.<repository>.fetch` entries in your configuration
43+
for a <repository> and running a
4244
'git pull' command without any explicit <refspec> parameters.
43-
<refspec> listed explicitly on the command line are always
45+
<refspec>s listed explicitly on the command line are always
4446
merged into the current branch after fetching. In other words,
45-
if you list more than one remote refs, you would be making
46-
an Octopus. While 'git pull' run without any explicit <refspec>
47-
parameter takes default <refspec>s from `Pull:` lines, it
48-
merges only the first <refspec> found into the current branch,
49-
after fetching all the remote refs. This is because making an
47+
if you list more than one remote ref, 'git pull' will create
48+
an Octopus merge. On the other hand, if you do not list any
49+
explicit <refspec> parameter on the command line, 'git pull'
50+
will fetch all the <refspec>s it finds in the
51+
`remote.<repository>.fetch` configuration and merge
52+
only the first <refspec> found into the current branch.
53+
This is because making an
5054
Octopus from remote refs is rarely done, while keeping track
5155
of multiple remote heads in one-go by fetching more than one
5256
is often useful.
57+
endif::git-pull[]
5358
+
5459
Some short-cut notations are also supported.
5560
+

0 commit comments

Comments
 (0)