Skip to content

Commit 3f0350c

Browse files
committed
rev-list docs: clarify --topo-order description
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 <[email protected]>
1 parent d0f1ea6 commit 3f0350c

File tree

1 file changed

+24
-7
lines changed

1 file changed

+24
-7
lines changed

Documentation/rev-list-options.txt

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -578,16 +578,33 @@ Commit Ordering
578578

579579
By default, the commits are shown in reverse chronological order.
580580

581-
--topo-order::
581+
--date-order::
582+
Show no parents before all of its children are shown, but
583+
otherwise show commits in the commit timestamp order.
582584

583-
This option makes them appear in topological order (i.e.
584-
descendant commits are shown before their parents).
585+
--topo-order::
586+
Show no parents before all of its children are shown, and
587+
avoid showing commits on multiple lines of history
588+
intermixed.
589+
+
590+
For example, in a commit history like this:
591+
+
592+
----------------------------------------------------------------
585593

586-
--date-order::
594+
---1----2----4----7
595+
\ \
596+
3----5----6----8---
587597

588-
This option is similar to '--topo-order' in the sense that no
589-
parent comes before all of its children, but otherwise things
590-
are still ordered in the commit timestamp order.
598+
----------------------------------------------------------------
599+
+
600+
where the numbers denote the order of commit timestamps, `git
601+
rev-list` and friends with `--date-order` show the commits in the
602+
timestamp order: 8 7 6 5 4 3 2 1.
603+
+
604+
With `--topo-order`, they would show 8 6 5 3 7 4 2 1 (or 8 7 4 2 6 5
605+
3 1); some older commits are shown before newer ones in order to
606+
avoid showing the commits from two parallel development track mixed
607+
together.
591608

592609
--reverse::
593610

0 commit comments

Comments
 (0)