Subject: git-show-branch doesn't work as advertised?

From: Sergei Organov <[email-masked]>
Date: Sat, 27 Oct 2007 17:26:26 +0400

Hello,

I'm rather new to git. I'm reading Documentation/core-tutorial.txt from
git repository cloned yesterday [no, it's not the first git manual I
read], and I'm stuck at the example beginning at line 938 of the
tutorial:

------------------------------------------------
$ git show-branch --topo-order master mybranch
* [master] Merge work in mybranch
 ! [mybranch] Some work.
--
-  [master] Merge work in mybranch
*+ [mybranch] Some work.
------------------------------------------------

The problem is that even though the output of git matches the above
output (after I've replayed all the commands to this point), both the
state of the repo and the text below the example in the tutorial suggest
that one commit is missing from the output. In particular, the tutorial
says: "Three commits are shown along with their log messages." and
later "'master~1' is the first parent of 'master' branch head.", while
there are only 2 commits shown and there is no 'master~1' in the output.

The behavior is the same with git version 1.5.2.2 and 1.5.3.4.

For reference, from gitk output, the history looks like this:

.  [master]
.  o Merge work in mybranch
.  |\[mybranch]
.  | o Some work
.  | |
.  o | Some fun
.   \|
.    o Commit message
.    |
.    o Initial commit

Why "[master~1] Some fun." is not shown by git-show-branch?

Another issue. After above confusion I turned to the manual page and
decided to try --independent option, expecting an output similar to the
above, but missing all the common commits. However, to my surprise I've
got just:

$ git show-branch --topo-order --independent master mybranch
715ec06a744a801237c7233f3fb87ad583653c3a

instead. Nowhere the manual page says that this particular option
changes the format of the output so dramatically. And back to the first
issue, there is still only 1 commit shown, while it seems there should
be 2 of them, one from master, and one from mybranch.

-- 
Sergei.