git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Organov <osv@javad.com>
To: git@vger.kernel.org
Subject: git-show-branch doesn't work as advertised?
Date: Sat, 27 Oct 2007 17:26:26 +0400	[thread overview]
Message-ID: <ffvea2$g2n$2@ger.gmane.org> (raw)

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.

                 reply	other threads:[~2007-10-27 13:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='ffvea2$g2n$2@ger.gmane.org' \
    --to=osv@javad.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).