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

[PATCH v2] rev-list docs: clarify --topo-order description

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 15, 2012, 20:02 UTC
Message-ID
<7vmx1v53fb.fsf_-_@alter.siamese.dyndns.org>
In-Reply-To
<87sjbpa5m8.fsf@thomas.inf.ethz.ch>

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
Previous: Junio C HamanoNext: Martin von Zweigbergk
Message 11 of 26 in “rev-list docs: clarify --topo-order description”
  1. rev-list docs: clarify --topo-order descriptionJunio C Hamano, Aug 13, 2012
  2. Martin von ZweigbergkAug 13, 2012
  3. Junio C HamanoAug 13, 2012
  4. Martin von ZweigbergkAug 14, 2012
  5. Junio C HamanoAug 14, 2012
  6. Michael HaggertyAug 14, 2012
  7. Thomas RastAug 14, 2012
  8. Junio C HamanoAug 14, 2012
  9. Thomas RastAug 14, 2012
  10. Junio C HamanoAug 14, 2012
  11. rev-list docs: clarify --topo-order descriptionJunio C Hamano, Aug 15, 2012
  12. Martin von ZweigbergkAug 16, 2012
  13. Junio C HamanoAug 16, 2012
  14. Junio C HamanoAug 16, 2012
  15. Thomas RastAug 16, 2012
  16. Michael HaggertyAug 16, 2012
  17. Thomas RastAug 16, 2012
  18. Junio C HamanoAug 16, 2012
  19. Thomas RastAug 17, 2012
  20. Thomas RastAug 17, 2012
  21. Junio C HamanoAug 17, 2012
  22. Thomas RastAug 17, 2012
  23. Junio C HamanoAug 17, 2012
  24. Junio C HamanoAug 17, 2012
  25. Michael HaggertyAug 16, 2012
  26. Thomas RastAug 16, 2012

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.