aboutsummaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorSergei Organov <osv@javad.com>2007-11-08 18:10:28 +0300
committerJunio C Hamano <gitster@pobox.com>2007-11-10 02:01:12 -0800
commit2782c9355a97667acfc40a828dbae5c5bc151047 (patch)
treeeb7816214f191d8371a15f8eeb94802c566e7958 /Documentation
parent5aa5cd460ccb6b18a1fcd53d566dadf049ceaf63 (diff)
downloadgit-2782c9355a97667acfc40a828dbae5c5bc151047.tar.gz
git-2782c9355a97667acfc40a828dbae5c5bc151047.tar.xz
core-tutorial.txt: Fix git-show-branch example and its description
Signed-off-by: Sergei Organov <osv@javad.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/core-tutorial.txt17
1 files changed, 15 insertions, 2 deletions
diff --git a/Documentation/core-tutorial.txt b/Documentation/core-tutorial.txt
index 99817c533..ebd2492bc 100644
--- a/Documentation/core-tutorial.txt
+++ b/Documentation/core-tutorial.txt
@@ -931,12 +931,13 @@ Another useful tool, especially if you do not always work in X-Window
environment, is `git show-branch`.
------------------------------------------------
-$ git show-branch --topo-order master mybranch
+$ git-show-branch --topo-order --more=1 master mybranch
* [master] Merge work in mybranch
! [mybranch] Some work.
--
- [master] Merge work in mybranch
*+ [mybranch] Some work.
+* [master^] Some fun.
------------------------------------------------
The first two lines indicate that it is showing the two branches
@@ -954,10 +955,22 @@ because `mybranch` has not been merged to incorporate these
commits from the master branch. The string inside brackets
before the commit log message is a short name you can use to
name the commit. In the above example, 'master' and 'mybranch'
-are branch heads. 'master~1' is the first parent of 'master'
+are branch heads. 'master^' is the first parent of 'master'
branch head. Please see 'git-rev-parse' documentation if you
see more complex cases.
+[NOTE]
+Without the '--more=1' option, 'git-show-branch' would not output the
+'[master^]' commit, as '[mybranch]' commit is a common ancestor of
+both 'master' and 'mybranch' tips. Please see 'git-show-branch'
+documentation for details.
+
+[NOTE]
+If there were more commits on the 'master' branch after the merge, the
+merge commit itself would not be shown by 'git-show-branch' by
+default. You would need to provide '--sparse' option to make the
+merge commit visible in this case.
+
Now, let's pretend you are the one who did all the work in
`mybranch`, and the fruit of your hard work has finally been merged
to the `master` branch. Let's go back to `mybranch`, and run