-
Notifications
You must be signed in to change notification settings - Fork 342
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
obslog: reverse order of predecessors in topo traversal
Currently, when there is a commit with two predecessors, the graph splits into two branches, and all of the predecessors on the first branch are printed before all of the predecessors on the second branch. This causes the graph to grow wider with each squashed commit, since the second branch must always get indented one level farther each time a commit is squashed. I have some commits where the graph is indented more than 10 levels due to squashing more than 10 times, making it very difficult to read. Reversing the order and printing the second branch before the first branch prevents this unnecessary indentation and makes the graph easier to read. This does not change the order of the edges in the graph (i.e. the first predecessor is still the first edge and the second predecessor is still the second edge in the graph).
- Loading branch information
Showing
3 changed files
with
24 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -245,21 +245,21 @@ fn test_obslog_squash() { | |
│ │ Modified regular file file1: | ||
│ │ 1 1: foo | ||
│ │ 2: bar | ||
◉ │ qpvuntsm hidden [email protected] 2001-02-03 08:05:09 766420db | ||
│ │ first | ||
│ │ Added regular file file1: | ||
│ │ 1: foo | ||
◉ │ qpvuntsm hidden [email protected] 2001-02-03 08:05:08 fa15625b | ||
│ │ (empty) first | ||
◉ │ qpvuntsm hidden [email protected] 2001-02-03 08:05:07 230dd059 | ||
│ (empty) (no description set) | ||
◉ kkmpptxz hidden [email protected] 2001-02-03 08:05:10 46acd22a | ||
│ second | ||
│ Modified regular file file1: | ||
│ 1 1: foo | ||
│ 2: bar | ||
◉ kkmpptxz hidden [email protected] 2001-02-03 08:05:09 cba41deb | ||
(empty) second | ||
│ ◉ kkmpptxz hidden [email protected] 2001-02-03 08:05:10 46acd22a | ||
│ │ second | ||
│ │ Modified regular file file1: | ||
│ │ 1 1: foo | ||
│ │ 2: bar | ||
│ ◉ kkmpptxz hidden [email protected] 2001-02-03 08:05:09 cba41deb | ||
│ (empty) second | ||
◉ qpvuntsm hidden [email protected] 2001-02-03 08:05:09 766420db | ||
│ first | ||
│ Added regular file file1: | ||
│ 1: foo | ||
◉ qpvuntsm hidden [email protected] 2001-02-03 08:05:08 fa15625b | ||
│ (empty) first | ||
◉ qpvuntsm hidden [email protected] 2001-02-03 08:05:07 230dd059 | ||
(empty) (no description set) | ||
"###); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters