git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Thomas Rast <trast@student.ethz.ch>
Cc: <git@vger.kernel.org>,
	"Martin von Zweigbergk" <martin.von.zweigbergk@gmail.com>
Subject: [PATCH v2] rev-list docs: clarify --topo-order description
Date: Wed, 15 Aug 2012 13:02:48 -0700	[thread overview]
Message-ID: <7vmx1v53fb.fsf_-_@alter.siamese.dyndns.org> (raw)
In-Reply-To: <87sjbpa5m8.fsf@thomas.inf.ethz.ch> (Thomas Rast's message of "Tue, 14 Aug 2012 16:51:59 +0200")

It was unclear what "--topo-order" was really about in the
documentation.  It is not just about "children before parent", but
also about "don't mix lineages".

Reword the description for both "--date-order" and "--topo-order",
and add an illustration to it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
  Thomas Rast <trast@student.ethz.ch> writes:

  > But then the new description is wrong.  It claims that children are
  > always before parents, which is not true in the face of clock skew.

  Thanks for sanity-check.  Here is an updated one.

 Documentation/rev-list-options.txt | 31 ++++++++++++++++++++++++-------
 1 file changed, 24 insertions(+), 7 deletions(-)

diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt
index 6a4b635..9404d08 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -578,16 +578,33 @@ Commit Ordering
 
 By default, the commits are shown in reverse chronological order.
 
---topo-order::
+--date-order::
+	Show no parents before all of its children are shown, but
+	otherwise show commits in the commit timestamp order.
 
-	This option makes them appear in topological order (i.e.
-	descendant commits are shown before their parents).
+--topo-order::
+	Show no parents before all of its children are shown, and
+	avoid showing commits on multiple lines of history
+	intermixed.
++
+For example, in a commit history like this:
++
+----------------------------------------------------------------
 
---date-order::
+    ---1----2----4----7
+	\	       \
+	 3----5----6----8---
 
-	This option is similar to '--topo-order' in the sense that no
-	parent comes before all of its children, but otherwise things
-	are still ordered in the commit timestamp order.
+----------------------------------------------------------------
++
+where the numbers denote the order of commit timestamps, `git
+rev-list` and friends with `--date-order` show the commits in the
+timestamp order: 8 7 6 5 4 3 2 1.
++
+With `--topo-order`, they would show 8 6 5 3 7 4 2 1 (or 8 7 4 2 6 5
+3 1); some older commits are shown before newer ones in order to
+avoid showing the commits from two parallel development track mixed
+together.
 
 --reverse::
 
-- 
1.7.12.rc2.85.g1de7134

  parent reply	other threads:[~2012-08-15 20:03 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-13 22:21 [PATCH] rev-list docs: clarify --topo-order description Junio C Hamano
2012-08-13 22:46 ` Martin von Zweigbergk
2012-08-13 23:05   ` Junio C Hamano
2012-08-14  5:33     ` Martin von Zweigbergk
2012-08-14 14:54       ` Junio C Hamano
2012-08-14  8:22 ` Michael Haggerty
2012-08-14  8:45 ` Thomas Rast
2012-08-14 14:30   ` Junio C Hamano
2012-08-14 14:51     ` Thomas Rast
2012-08-14 15:47       ` Junio C Hamano
2012-08-15 20:02       ` Junio C Hamano [this message]
2012-08-16  6:06         ` [PATCH v2] " Martin von Zweigbergk
2012-08-16  6:20           ` Junio C Hamano
2012-08-16  6:26             ` Junio C Hamano
2012-08-16  8:51               ` Thomas Rast
2012-08-16 10:01                 ` Michael Haggerty
2012-08-16 12:00                   ` Thomas Rast
2012-08-16 16:10                     ` Junio C Hamano
2012-08-17  9:34                       ` Thomas Rast
2012-08-17  9:50                         ` Thomas Rast
2012-08-17 17:18                         ` Junio C Hamano
2012-08-17 17:37                           ` Thomas Rast
2012-08-17 18:11                             ` Junio C Hamano
2012-08-17 17:40                         ` Junio C Hamano
2012-08-16 16:35                     ` Michael Haggerty
2012-08-16  8:42         ` Thomas Rast

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=7vmx1v53fb.fsf_-_@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=martin.von.zweigbergk@gmail.com \
    --cc=trast@student.ethz.ch \
    /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).