git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 5/9] fetch doc: on pulling multiple refspecs

From
Marc Branchaud <marcnarc@xiplink.com>
Date
Jun 4, 2014, 14:44 UTC
Message-ID
<538F30C2.2000601@xiplink.com>
In-Reply-To
<1401833792-2486-6-git-send-email-gitster@pobox.com>
On 14-06-03 06:16 PM, Junio C Hamano wrote:
Show 27 quoted lines
> 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 <gitster@pobox.com>
> ---
>  Documentation/pull-fetch-param.txt | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/pull-fetch-param.txt b/Documentation/pull-fetch-param.txt
> index 40f8687..25af2ce 100644
> --- a/Documentation/pull-fetch-param.txt
> +++ b/Documentation/pull-fetch-param.txt
> @@ -34,22 +34,26 @@ will be needed for such branches.  There is no way to
>  determine or declare that a branch will be made available
>  in a repository with this behavior; the pulling user simply
>  must know this is the expected usage pattern for a branch.
> +ifdef::git-pull[]
>  +
>  [NOTE]
>  There is a difference between listing multiple <refspec>
>  directly on 'git pull' command line and having multiple
> -`Pull:` <refspec> lines for a <repository> and running
> +`remote.<repository>.fetch` entries in your configuration
> +for a <repository> and running
s/running/running a/
>  'git pull' command without any explicit <refspec> parameters.
>  <refspec> listed explicitly on the command line are always
s/<refspec>/<refspec>s/
>  merged into the current branch after fetching.  In other words,
>  if you list more than one remote refs, you would be making
s/refs, you would be making/ref, 'git pull' will create/
Show 8 quoted lines
> -an Octopus.  While 'git pull' run without any explicit <refspec>
> -parameter takes default <refspec>s from `Pull:` lines, it
> +an Octopus merge. On the other hand, 'git pull' that is run
> +without any explicit <refspec> parameter takes default
> +<refspec>s from `remote.<repository>.fetch` configuration, it
>  merges only the first <refspec> found into the current branch,
> -after fetching all the remote refs.  This is because making an
> +after fetching all the remote refs specified.  This is because making an
That "On the other hand" sentence is hard to parse.  How about
	On the other hand, if you do not list any remote refs, 'git pull'
	will fetch all the <refspec>s it finds in the
	`remote.<repository>.fetch` configuration and merge only the
	first <refspec> found into the current branch.

Actually, "first <refspec> found" is also wrong, isn't it? I'm not sure I can craft a succinct summary of pull's merge behaviour for this note!

Show 7 quoted lines
>  Octopus from remote refs is rarely done, while keeping track
>  of multiple remote heads in one-go by fetching more than one
>  is often useful.
> +endif::git-pull[]
>  +
>  Some short-cut notations are also supported.
>  +

Hmmm, in my 2.0 man page output (asciidoc 8.6.9 on Ubuntu) there's no empty line between the end of the note and the "Some short-cut notations" line, which I think is inconsistent with the rest of the formatting. The HTML version looks fine though. Is there some asciidoc-ese that would insert a line there for the man format?

		M.
Previous: Junio C HamanoNext: Junio C Hamano
Message 8 of 24 in “Clarify two uses of remote.*.fetch”
  1. 0/9 Clarify two uses of remote.*.fetchJunio C Hamano, Jun 3, 2014
  2. 1/9 fetch doc: update introductory part for clarityJunio C Hamano, Jun 3, 2014
  3. 2/9 fetch doc: move FETCH_HEAD material lower and add an exampleJunio C Hamano, Jun 3, 2014
  4. 3/9 fetch doc: update note on '+' in front of the refspecJunio C Hamano, Jun 3, 2014
  5. Michael HaggertyJun 18, 2014
  6. 4/9 fetch doc: remove notes on outdated "mixed layout"Junio C Hamano, Jun 3, 2014
  7. 5/9 fetch doc: on pulling multiple refspecsJunio C Hamano, Jun 3, 2014
  8. Marc BranchaudJun 4, 2014
  9. 6/9 fetch doc: update refspec format descriptionJunio C Hamano, Jun 3, 2014
  10. 7/9 fetch doc: remove "short-cut" sectionJunio C Hamano, Jun 3, 2014
  11. Marc BranchaudJun 4, 2014
  12. 8/9 fetch doc: add a section on configured remote-tracking branchesJunio C Hamano, Jun 3, 2014
  13. Marc BranchaudJun 4, 2014
  14. Junio C HamanoJun 4, 2014
  15. Marc BranchaudJun 5, 2014
  16. docs: Explain the purpose of fetch's and pull's <refspec> parameter.Marc Branchaud, Jun 5, 2014
  17. Junio C HamanoJun 5, 2014
  18. docs: Explain the purpose of fetch's and pull's <refspec> parameter.Marc Branchaud, Jun 11, 2014
  19. 9/9 fetch: allow explicit --refmap to override configurationJunio C Hamano, Jun 3, 2014
  20. Marc BranchaudJun 4, 2014
  21. Junio C HamanoJun 4, 2014
  22. Marc BranchaudJun 5, 2014
  23. Junio C HamanoJun 5, 2014
  24. Michael HaggertyJun 18, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.