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

Re: [PATCH] Add a reference to gitk localbranc remote/branch in gittutorial

From
PCPaolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Date
Aug 27, 2008, 07:58 UTC
Message-ID
<4d8e3fd30808270058g3379174bn9efe09f550aa0721@mail.gmail.com>
In-Reply-To
<7viqtnabld.fsf@gitster.siamese.dyndns.org>
On Tue, Aug 26, 2008 at 8:13 PM, Junio C Hamano <gitster@pobox.com> wrote:
> "Paolo Ciarrocchi" <paolo.ciarrocchi@gmail.com> writes:
[...]
> So here are the tweaks I would suggest:
>
>  * Show only "git log -p HEAD..FETCH_HEAD" here;
OK.
Show 6 quoted lines
>  * After "This operation is safe ... local changes.", say "The range
>   notation HEAD..FETCH_HEAD" means "show everything that is reachable
>   from the FETCH_HEAD but exclude anything that is reachable from HEAD.
>   Alice already knows everything that leads to her current state (HEAD),
>   and reviewing what Bob has in his state (FETCH_HEAD) that she has not
>   seen with this command";
Makes sense.
>  * Drop "This means..." and "log -p ..FETCH" example;
OK.
Show 11 quoted lines
>  * Replace the explanation for the two-dot range notation after "gitk
>   HEAD..FETCH_HEAD" with "This uses the same two-dot range notation we
>   saw earlier with 'git log'".
>
>  * And finally, if we wanted to, we can top about omission of HEAD in
>   either end of the range notation.  Just before "Please note that these
>   range notation...", say "Because viewing range between your current
>   state and something else is common, you can omit HEAD from either side
>   of two- or three-dot range notation.  I.e. 'git log ..FETCH_HEAD' is a
>   shorthand for 'git log HEAD..FETCH_HEAD', and 'gitk ...FETCH_HEAD' is a
>   shorthand for 'gitk HEAD...FETCH_HEAD'.

Right now I dind't mention the shorthand, I'm not sure whether it's worth to mention it in this first tutorial.

What do you think of this whitespace damaged patch? BTW, does anybody know if/how to inline a patch using the web interface of Gmail?

--8<---
diff --git a/gittutorial.txt.txt b/gittutorial.txt.txt
index 48d1454..384972c 100644
--- a/gittutorial.txt.txt
+++ b/gittutorial.txt.txt
@@ -321,10 +321,37 @@ pulling, like this:

 ------------------------------------------------
 alice$ git fetch /home/bob/myrepo master
-alice$ git log -p ..FETCH_HEAD
+alice$ git log -p HEAD..FETCH_HEAD
 ------------------------------------------------

 This operation is safe even if Alice has uncommitted local changes.
+The range notation HEAD..FETCH_HEAD" means "show everything that is reachable
+from the FETCH_HEAD but exclude anything that is reachable from HEAD.
+Alice already knows everything that leads to her current state (HEAD),
+and reviewing what Bob has in his state (FETCH_HEAD) that she has not
+seen with this command
+
+If Alice wants to visualize what Bob did since their histories forked
+she can issue the following command:
+
+------------------------------------------------
+$ gitk HEAD..FETCH_HEAD
+------------------------------------------------
+
+This uses the same two-dot range notation we saw earlier with 'git log'.
+
+Alice may want to view what both of them did since they forked.
+She can use three-dot form instead of the two-dot form:
+
+------------------------------------------------
+$ gitk HEAD...FETCH_HEAD
+------------------------------------------------
+
+This means "show everything that is reachable from either one, but
+exclude anything that is reachable from both of them".
+
+Please note that these range notation can be used with both gitk
+and "git log".

 After inspecting what Bob did, if there is nothing urgent, Alice may
 decide to continue working without pulling from Bob.  If Bob's history
--8<---
-- 
Paolo
http://paolo.ciarrocchi.googlepages.com/
Previous: Junio C HamanoNext: Junio C Hamano
Message 12 of 15 in “Add a reference to gitk localbranc remote/branch in gittutorial”
  1. Add a reference to gitk localbranc remote/branch in gittutorialPaolo Ciarrocchi, Aug 25, 2008
  2. Eric RaibleAug 25, 2008
  3. Paolo CiarrocchiAug 25, 2008
  4. Junio C HamanoAug 25, 2008
  5. Paolo CiarrocchiAug 25, 2008
  6. Junio C HamanoAug 26, 2008
  7. Paolo CiarrocchiAug 26, 2008
  8. Eric RaibleAug 26, 2008
  9. Paolo CiarrocchiAug 26, 2008
  10. Paolo CiarrocchiAug 26, 2008
  11. Junio C HamanoAug 26, 2008
  12. Paolo CiarrocchiAug 27, 2008
  13. Junio C HamanoAug 27, 2008
  14. Paolo CiarrocchiAug 28, 2008
  15. Paolo CiarrocchiAug 27, 2008

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.