diff --git a/revision.c b/revision.c index df1d9eac5fc3f3..e71bf97f2406d6 100644 --- a/revision.c +++ b/revision.c @@ -4355,7 +4355,9 @@ const char *get_revision_mark(const struct rev_info *revs, const struct commit * return "<"; else return ">"; - } else if (revs->graph) + } else if (!commit->parents && revs->graph) + return "o"; + else if (revs->graph) return "*"; else if (revs->cherry_mark) return "+"; diff --git a/t/t3430-rebase-merges.sh b/t/t3430-rebase-merges.sh index 14d76487a3efbd..110a0e9a9f1619 100755 --- a/t/t3430-rebase-merges.sh +++ b/t/t3430-rebase-merges.sh @@ -97,7 +97,7 @@ test_expect_success 'create completely different structure' ' |/| | * B |/ - * A + o A EOF ' @@ -397,8 +397,8 @@ test_expect_success 'root commits' ' test_cmp_graph HEAD <<-\EOF && * Merge the 3rd root |\ - | * third-root - * second-root + | o third-root + o second-root EOF : fast forward if possible && @@ -433,7 +433,7 @@ test_expect_success 'A root commit can be a cousin, treat it that way' ' test_cmp_graph HEAD^.. <<-\EOF && * Merge branch '\''khnum'\'' into asherah |\ - | * yama + | o yama ^ shamkat EOF test_tick && @@ -574,7 +574,7 @@ test_expect_success '--rebase-merges with message matched with onto label' ' |/| * | C |/ - * A + o A EOF ' diff --git a/t/t4202-log.sh b/t/t4202-log.sh index af4a123cd223ef..646a2c7f019872 100755 --- a/t/t4202-log.sh +++ b/t/t4202-log.sh @@ -567,7 +567,7 @@ cat > expect < expect < expect <<\EOF |/ * third * second -* initial +o initial EOF test_expect_success 'log --graph with merge' ' @@ -627,7 +627,7 @@ cat > expect <<\EOF | | | |/ | | | * third | | | * second -| | | * initial +| | | o initial EOF test_expect_success 'log --graph --line-prefix="| | | " with merge' ' @@ -646,7 +646,7 @@ cat > expect.colors <<\EOF |/ * third * second -* initial +o initial EOF test_expect_success 'log --graph with merge with log.graphColors' ' @@ -711,7 +711,7 @@ cat > expect <<\EOF | | second | -* commit tags/side-1~3 +o commit tags/side-1~3 Author: A U Thor initial @@ -786,7 +786,7 @@ cat > expect <<\EOF * / third |/ * second -* initial +o initial EOF test_expect_success 'log --graph with merge' ' @@ -1518,7 +1518,7 @@ cat >expect <<\EOF | -one | +ichi | -* commit COMMIT_OBJECT_NAME +o commit COMMIT_OBJECT_NAME Author: A U Thor initial @@ -1793,7 +1793,7 @@ cat >expect <<\EOF *** | -one *** | +ichi *** | -*** * commit COMMIT_OBJECT_NAME +*** o commit COMMIT_OBJECT_NAME *** Author: A U Thor *** *** initial diff --git a/t/t4205-log-pretty-formats.sh b/t/t4205-log-pretty-formats.sh index 4cf8a7766768bf..0688117059248b 100755 --- a/t/t4205-log-pretty-formats.sh +++ b/t/t4205-log-pretty-formats.sh @@ -379,7 +379,7 @@ test_expect_success 'right alignment formatting at the nth column with --graph. * $head1 message two * $head2 message one * $head3 add bar - * $head4 $(commit_msg) + o $head4 $(commit_msg) EOF test_cmp expected actual ' @@ -401,7 +401,7 @@ test_expect_success 'right alignment formatting with no padding and with --graph * message two * message one * add bar - * $(commit_msg) + o $(commit_msg) EOF test_cmp expected actual ' diff --git a/t/t4214-log-graph-octopus.sh b/t/t4214-log-graph-octopus.sh index f70c46bbbfa2c8..9190edbd6e82a8 100755 --- a/t/t4214-log-graph-octopus.sh +++ b/t/t4214-log-graph-octopus.sh @@ -48,7 +48,7 @@ test_expect_success 'log --graph with tricky octopus merge, no color' ' | |/ * / 1 |/ - * initial + o initial EOF ' @@ -65,7 +65,7 @@ test_expect_success 'log --graph with tricky octopus merge with colors' ' | |/ * / 1 |/ - * initial + o initial EOF test_cmp_colored_graph left octopus-merge ' @@ -84,7 +84,7 @@ test_expect_success 'log --graph with normal octopus merge, no color' ' | |/ * / 1 |/ - * initial + o initial EOF ' @@ -99,7 +99,7 @@ test_expect_success 'log --graph with normal octopus merge with colors' ' | |/ * / 1 |/ - * initial + o initial EOF test_config log.graphColors red,green,yellow,blue,magenta,cyan && test_cmp_colored_graph octopus-merge @@ -117,7 +117,7 @@ test_expect_success 'log --graph with normal octopus merge and child, no color' | |/ * / 1 |/ - * initial + o initial EOF ' @@ -133,7 +133,7 @@ test_expect_success 'log --graph with normal octopus and child merge with colors | |/ * / 1 |/ - * initial + o initial EOF test_config log.graphColors red,green,yellow,blue,magenta,cyan && test_cmp_colored_graph after-merge @@ -152,7 +152,7 @@ test_expect_success 'log --graph with tricky octopus merge and its child, no col | |/ * / 1 |/ - * initial + o initial EOF ' @@ -170,7 +170,7 @@ test_expect_success 'log --graph with tricky octopus merge and its child with co | |/ * / 1 |/ - * initial + o initial EOF test_cmp_colored_graph left after-merge ' @@ -191,7 +191,7 @@ test_expect_success 'log --graph with crossover in octopus merge, no color' ' |/| | * 1 |/ - * initial + o initial EOF ' @@ -212,7 +212,7 @@ test_expect_success 'log --graph with crossover in octopus merge with colors' ' |/| | * 1 |/ - * initial + o initial EOF test_cmp_colored_graph after-4 octopus-merge ' @@ -234,7 +234,7 @@ test_expect_success 'log --graph with crossover in octopus merge and its child, |/| | * 1 |/ - * initial + o initial EOF ' @@ -256,7 +256,7 @@ test_expect_success 'log --graph with crossover in octopus merge and its child w |/| | * 1 |/ - * initial + o initial EOF test_cmp_colored_graph after-4 after-merge ' @@ -277,7 +277,7 @@ test_expect_success 'log --graph with unrelated commit and octopus tip, no color |/| | * 1 |/ - * initial + o initial EOF ' @@ -298,7 +298,7 @@ test_expect_success 'log --graph with unrelated commit and octopus tip with colo |/| | * 1 |/ - * initial + o initial EOF test_cmp_colored_graph after-initial octopus-merge ' @@ -320,7 +320,7 @@ test_expect_success 'log --graph with unrelated commit and octopus child, no col |/| | * 1 |/ - * initial + o initial EOF ' @@ -342,7 +342,7 @@ test_expect_success 'log --graph with unrelated commit and octopus child with co |/| | * 1 |/ - * initial + o initial EOF test_cmp_colored_graph after-initial after-merge ' diff --git a/t/t4215-log-skewed-merges.sh b/t/t4215-log-skewed-merges.sh index 28d0779a8c599e..c38cd1273780b9 100755 --- a/t/t4215-log-skewed-merges.sh +++ b/t/t4215-log-skewed-merges.sh @@ -34,7 +34,7 @@ test_expect_success 'log --graph with merge fusing with its left and right neigh | |/ * / B |/ - * A + o A EOF ' @@ -68,7 +68,7 @@ test_expect_success 'log --graph with left-skewed merge' ' |/| | * 0_B |/ - * 0_A + o 0_A EOF ' @@ -96,7 +96,7 @@ test_expect_success 'log --graph with nested left-skewed merge' ' |/ / * / 1_B |/ - * 1_A + o 1_A EOF ' @@ -133,7 +133,7 @@ test_expect_success 'log --graph with nested left-skewed merge following normal |/| * | 2_B |/ - * 2_A + o 2_A EOF ' @@ -166,7 +166,7 @@ test_expect_success 'log --graph with nested right-skewed merge following left-s | |/ | * 3_B |/ - * 3_A + o 3_A EOF ' @@ -198,7 +198,7 @@ test_expect_success 'log --graph with right-skewed merge following a left-skewed | |/ | * 4_B |/ - * 4_A + o 4_A EOF ' @@ -235,7 +235,7 @@ test_expect_success 'log --graph with octopus merge with column joining its penu |/| | * 5_B |/ - * 5_A + o 5_A EOF ' @@ -277,7 +277,7 @@ test_expect_success 'log --graph with multiple tips' ' |/| * | 6_B |/ - * 6_A + o 6_A EOF ' @@ -303,7 +303,7 @@ test_expect_success 'log --graph with multiple tips and colors' ' |/| * | 6_B |/ - * 6_A + o 6_A EOF lib_test_cmp_colored_graph --date-order --pretty=tformat:%s 6_1 6_3 6_5 ' @@ -366,7 +366,7 @@ test_expect_success 'log --graph with multiple tips' ' |/| * | 7_B |/ - * 7_A + o 7_A EOF ' diff --git a/t/t6012-rev-list-simplify.sh b/t/t6012-rev-list-simplify.sh index de1e87f1621d5d..d1c7fca0a8cac7 100755 --- a/t/t6012-rev-list-simplify.sh +++ b/t/t6012-rev-list-simplify.sh @@ -277,7 +277,7 @@ test_expect_success 'log --graph --simplify-merges --show-pulls' ' | |/ * / A |/ - * I + o I EOF git log --graph --pretty="%s" \ --simplify-merges --show-pulls \ diff --git a/t/t6016-rev-list-graph-simplify-history.sh b/t/t6016-rev-list-graph-simplify-history.sh index b971b3dc91bcc0..322e6c49d20d01 100755 --- a/t/t6016-rev-list-graph-simplify-history.sh +++ b/t/t6016-rev-list-graph-simplify-history.sh @@ -74,7 +74,7 @@ test_expect_success '--graph --all' ' |/| * | A2 |/ - * A1 + o A1 EOF ' @@ -102,7 +102,7 @@ test_expect_success '--graph --simplify-by-decoration' ' |/| * | A2 |/ - * A1 + o A1 EOF ' @@ -128,7 +128,7 @@ test_expect_success '--graph --simplify-by-decoration prune branch B' ' * | A3 |/ * A2 - * A1 + o A1 EOF ' @@ -143,7 +143,7 @@ test_expect_success '--graph --full-history -- bar.txt' ' |\| * | A3 |/ - * A2 + o A2 EOF ' @@ -156,7 +156,7 @@ test_expect_success '--graph --full-history --simplify-merges -- bar.txt' ' * | A5 * | A3 |/ - * A2 + o A2 EOF ' @@ -167,7 +167,7 @@ test_expect_success '--graph -- bar.txt' ' * A3 | * C4 |/ - * A2 + o A2 EOF ' @@ -184,7 +184,7 @@ test_expect_success '--graph --sparse -- bar.txt' ' | * C1 |/ * A2 - * A1 + o A1 EOF '