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

Re: [PATCH 03/16] pull: cleanup documentation

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 31, 2013, 20:43 UTC
Message-ID
<xmqqfvrh41e0.fsf@gitster.dls.corp.google.com>
In-Reply-To
<xmqqzjpp447x.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 22 quoted lines
> Max Horn <max@quendi.de> writes:
>
>>> ... The "reality" is more like this:
>>> 
>>>      origin/master in your repository
>>>      |
>>>      v
>>>      A---B---C master at origin
>>>     /
>>>    D---E---F---G master in your repository
>>> 
>>> if you really want to write origin/master somewhere in this
>>> illustration.
>>
>> Actually, I kind of like that. After just reading the existing
>> phrasing in git-pull.txt, I doubt that a newbie would catch the
>> difference between "origin/master" and "master at origin". With this
>> illustration, it's very clearly conveyed that there is a difference.
>
> Yeah, after re-reading the part of the documentation with the
> illustration replaced with the above, I was coming to the same
> conclusion.

As Felipe spotted in his response, "A" is not something you already have, so the picture need to look like the amended patch below.

The other reason the original did not say "origin/master" is because this holds true even if you do not have such a remote-tracking branch for the master at the origin, but the illustration that shows the history after "git pull" finishes spells remotes/origin/master out, so I think it would be an improvement to make the two pictures consistent by drawing where the origin/master is before this "git pull" is run.

Something like this, perhaps. Note that I think "on" sounds funny and it should probably be "at" instead, but this weatherbaloon patch does not change it.

-- >8 --
Subject: doc/pull: clarify the illustrations

The second illustration that shows the history after "git pull" spelled the remote-tracking branch with "remotes/" prefix, which is not necessary. Drop it.

To match the assumption that a remote-tracking branch is used to keep track of the advancement of the master at the origin, update the first illustration that shows the history before "git pull" to show the distinction between the master currently at origin and the stale origin/master remote-tracking branch.

Noticed-by: Felipe Contreras <felipe.contreras@gmail.com>
Helped-by: Max Horn <max@quendi.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 Documentation/git-pull.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt
index beea10b..e83f3ce 100644
--- a/Documentation/git-pull.txt
+++ b/Documentation/git-pull.txt
@@ -42,6 +42,8 @@ Assume the following history exists and the current branch is
 	  A---B---C master on origin
 	 /
     D---E---F---G master
+        ^
+	origin/master in your repository
 ------------
 
 Then "`git pull`" will fetch and replay the changes from the remote
@@ -51,7 +53,7 @@ result in a new commit along with the names of the two parent commits
 and a log message from the user describing the changes.
 
 ------------
-	  A---B---C remotes/origin/master
+	  A---B---C origin/master
 	 /         \
     D---E---F---G---H master
 ------------
Previous: Junio C HamanoNext: Felipe Contreras
Message 11 of 48 in “Trivial patches”
  1. 00/16 Trivial patchesFelipe Contreras, Oct 31, 2013
  2. 01/16 merge: simplify ff-only optionFelipe Contreras, Oct 31, 2013
  3. Junio C HamanoOct 31, 2013
  4. 02/16 t: replace pulls with mergesFelipe Contreras, Oct 31, 2013
  5. 03/16 pull: cleanup documentationFelipe Contreras, Oct 31, 2013
  6. Junio C HamanoOct 31, 2013
  7. Felipe ContrerasOct 31, 2013
  8. Junio C HamanoOct 31, 2013
  9. Max HornOct 31, 2013
  10. Junio C HamanoOct 31, 2013
  11. Junio C HamanoOct 31, 2013
  12. Felipe ContrerasOct 31, 2013
  13. David AguilarOct 31, 2013
  14. Felipe ContrerasNov 1, 2013
  15. David AguilarNov 1, 2013
  16. Felipe ContrerasNov 1, 2013
  17. SZEDER GáborNov 1, 2013
  18. Felipe ContrerasNov 1, 2013
  19. Felipe ContrerasOct 31, 2013
  20. Junio C HamanoOct 31, 2013
  21. Felipe ContrerasOct 31, 2013
  22. 04/16 fetch: add missing documentationFelipe Contreras, Oct 31, 2013
  23. Junio C HamanoOct 31, 2013
  24. Felipe ContrerasOct 31, 2013
  25. 05/16 revision: add missing includeFelipe Contreras, Oct 31, 2013
  26. Junio C HamanoOct 31, 2013
  27. 06/16 shortlog: add missing declarationFelipe Contreras, Oct 31, 2013
  28. Junio C HamanoOct 31, 2013
  29. Felipe ContrerasOct 31, 2013
  30. Junio C HamanoOct 31, 2013
  31. Felipe ContrerasOct 31, 2013
  32. 07/16 branch: trivial style fixFelipe Contreras, Oct 31, 2013
  33. Junio C HamanoOct 31, 2013
  34. 08/16 sha1-name: trivial style cleanupFelipe Contreras, Oct 31, 2013
  35. 09/16 transport-helper: trivial style fixFelipe Contreras, Oct 31, 2013
  36. 10/16 describe: trivial style fixesFelipe Contreras, Oct 31, 2013
  37. 11/16 pretty: trivial style fixFelipe Contreras, Oct 31, 2013
  38. 12/16 revision: trivial style fixesFelipe Contreras, Oct 31, 2013
  39. 13/16 diff: trivial style fixFelipe Contreras, Oct 31, 2013
  40. 14/16 run-command: trivial style fixesFelipe Contreras, Oct 31, 2013
  41. 15/16 setup: trivial style fixesFelipe Contreras, Oct 31, 2013
  42. Junio C HamanoOct 31, 2013
  43. 16/16 add: avoid yoda conditionsFelipe Contreras, Oct 31, 2013
  44. Martin von ZweigbergkOct 31, 2013
  45. Felipe ContrerasOct 31, 2013
  46. Junio C HamanoOct 31, 2013
  47. Felipe ContrerasOct 31, 2013
  48. Max HornOct 31, 2013

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.