{"thread":{"id":"37925","subject":"[PATCH] graph.c: visual difference on subsequent series","startedAt":"2014-11-10T13:33:32Z","lastAt":"2015-09-04T16:08:02Z","messageCount":7,"participants":["Antoine Beaupré","Junio C Hamano","Michael J Gruber"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"251673","messageId":"1415626412-573-1-git-send-email-anarcat@koumbit.org","threadId":"37925","inReplyTo":null,"subject":"[PATCH] graph.c: visual difference on subsequent series","fromName":"Antoine Beaupré","fromEmail":"anarcat@koumbit.org","sentAt":"2014-11-10T13:33:32Z","receivedAt":"2014-11-10T13:33:32Z","isPatch":true,"sender":{"key":"anarcat@koumbit.org","avatar":"https://gravatar.com/avatar/d24e4c5d6c70e750da6059fd212c802b241f28b6035db7b4362788ca56b2141a?d=mp&s=160"},"body":"For projects with separate history lines and, thus, multiple root-commits, the\nlinear arrangement of `git log --graph --oneline` does not allow the user to\nspot where the sequence ends, giving the impression that it's a contiguous\nhistory. E.g.\n\nHistory sequence A: a1 -- a2 -- a3 (root-commit)\nHistory sequence B: b1 -- b2 -- b3 (root-commit)\n\n    git log --graph --oneline\n    * a1\n    * a2\n    * a3\n    * b1\n    * b2\n    * b3\n\nIn a GUI tool, the root-commit of each series would stand out on the graph.\n\nThis modification changes the commit char to a different symbol ('o'), so users\nof the command-line graph tool can easily identify root-commits and make sense\nof where each series is limited to.\n\n    git log --graph --oneline\n    * a1\n    * a2\n    o a3\n    * b1\n    * b2\n    o b3\n\nThe 'o' character was chosen because it is the same character used in rev-list\nto mark root commits.\n\nThis patch is similar than the one provided by Milton Soares Filho in\n1382734287.31768.1.git.send.email.milton.soares.filho@gmail.com but was\nimplemented independently and uses the 'o' character instead of 'x'.\n\nOther solutions were discarded for those reasons:\n\n * line delimiters: we want to keep one commit per line\n * tree indentation: it makes little sense with commit trees without\n   common history, and is more complicated to implement\n\nSigned-off-by: Antoine Beaupré <anarcat@koumbit.org>\n---\n revision.c                                 |  8 ++++++--\n t/t4202-log.sh                             | 10 +++++-----\n t/t6016-rev-list-graph-simplify-history.sh | 14 +++++++-------\n 3 files changed, 18 insertions(+), 14 deletions(-)\n\ndiff --git a/revision.c b/revision.c\nindex 75dda92..5f21e24 100644\n--- a/revision.c\n+++ b/revision.c\n@@ -3246,8 +3246,12 @@ char *get_revision_mark(const struct rev_info *revs, const struct commit *commit\n \t\t\treturn \"<\";\n \t\telse\n \t\t\treturn \">\";\n-\t} else if (revs->graph)\n-\t\treturn \"*\";\n+\t} else if (revs->graph) {\n+\t\tif (commit->parents)\n+\t\t\treturn \"*\";\n+\t\telse\n+\t\t\treturn \"o\";\n+\t}\n \telse if (revs->cherry_mark)\n \t\treturn \"+\";\n \treturn \"\";\ndiff --git a/t/t4202-log.sh b/t/t4202-log.sh\nindex 99ab7ca..d11876e 100755\n--- a/t/t4202-log.sh\n+++ b/t/t4202-log.sh\n@@ -244,7 +244,7 @@ cat > expect <<EOF\n * fourth\n * third\n * second\n-* initial\n+o initial\n EOF\n \n test_expect_success 'simple log --graph' '\n@@ -272,7 +272,7 @@ cat > expect <<\\EOF\n |/\n * third\n * second\n-* initial\n+o initial\n EOF\n \n test_expect_success 'log --graph with merge' '\n@@ -338,7 +338,7 @@ cat > expect <<\\EOF\n |\n |     second\n |\n-* commit tags/side-1~3\n+o commit tags/side-1~3\n   Author: A U Thor <author@example.com>\n \n       initial\n@@ -410,7 +410,7 @@ cat > expect <<\\EOF\n * | third\n |/\n * second\n-* initial\n+o initial\n EOF\n \n test_expect_success 'log --graph with merge' '\n@@ -799,7 +799,7 @@ cat >expect <<\\EOF\n | -one\n | +ichi\n |\n-* commit COMMIT_OBJECT_NAME\n+o commit COMMIT_OBJECT_NAME\n   Author: A U Thor <author@example.com>\n \n       initial\ndiff --git a/t/t6016-rev-list-graph-simplify-history.sh b/t/t6016-rev-list-graph-simplify-history.sh\nindex f7181d1..74b6fc3 100755\n--- a/t/t6016-rev-list-graph-simplify-history.sh\n+++ b/t/t6016-rev-list-graph-simplify-history.sh\n@@ -81,7 +81,7 @@ test_expect_success '--graph --all' '\n \techo \"|/|   \" >> expected &&\n \techo \"* | $A2\" >> expected &&\n \techo \"|/  \" >> expected &&\n-\techo \"* $A1\" >> expected &&\n+\techo \"o $A1\" >> expected &&\n \tgit rev-list --graph --all > actual &&\n \ttest_cmp expected actual\n \t'\n@@ -111,7 +111,7 @@ test_expect_success '--graph --simplify-by-decoration' '\n \techo \"|/|   \" >> expected &&\n \techo \"* | $A2\" >> expected &&\n \techo \"|/  \" >> expected &&\n-\techo \"* $A1\" >> expected &&\n+\techo \"o $A1\" >> expected &&\n \tgit rev-list --graph --all --simplify-by-decoration > actual &&\n \ttest_cmp expected actual\n \t'\n@@ -139,7 +139,7 @@ test_expect_success '--graph --simplify-by-decoration prune branch B' '\n \techo \"* | $A3\" >> expected &&\n \techo \"|/  \" >> expected &&\n \techo \"* $A2\" >> expected &&\n-\techo \"* $A1\" >> expected &&\n+\techo \"o $A1\" >> expected &&\n \tgit rev-list --graph --simplify-by-decoration --all > actual &&\n \ttest_cmp expected actual\n \t'\n@@ -156,7 +156,7 @@ test_expect_success '--graph --full-history -- bar.txt' '\n \techo \"| |/  \" >> expected &&\n \techo \"* | $A3\" >> expected &&\n \techo \"|/  \" >> expected &&\n-\techo \"* $A2\" >> expected &&\n+\techo \"o $A2\" >> expected &&\n \tgit rev-list --graph --full-history --all -- bar.txt > actual &&\n \ttest_cmp expected actual\n \t'\n@@ -170,7 +170,7 @@ test_expect_success '--graph --full-history --simplify-merges -- bar.txt' '\n \techo \"* | $A5\" >> expected &&\n \techo \"* | $A3\" >> expected &&\n \techo \"|/  \" >> expected &&\n-\techo \"* $A2\" >> expected &&\n+\techo \"o $A2\" >> expected &&\n \tgit rev-list --graph --full-history --simplify-merges --all \\\n \t\t-- bar.txt > actual &&\n \ttest_cmp expected actual\n@@ -183,7 +183,7 @@ test_expect_success '--graph -- bar.txt' '\n \techo \"* $A3\" >> expected &&\n \techo \"| * $C4\" >> expected &&\n \techo \"|/  \" >> expected &&\n-\techo \"* $A2\" >> expected &&\n+\techo \"o $A2\" >> expected &&\n \tgit rev-list --graph --all -- bar.txt > actual &&\n \ttest_cmp expected actual\n \t'\n@@ -201,7 +201,7 @@ test_expect_success '--graph --sparse -- bar.txt' '\n \techo \"| * $C1\" >> expected &&\n \techo \"|/  \" >> expected &&\n \techo \"* $A2\" >> expected &&\n-\techo \"* $A1\" >> expected &&\n+\techo \"o $A1\" >> expected &&\n \tgit rev-list --graph --sparse --all -- bar.txt > actual &&\n \ttest_cmp expected actual\n \t'\n-- \n2.1.1\n"},{"id":"266853","messageId":"87twspe6ix.fsf@marcos.anarc.at","threadId":"37925","inReplyTo":"1415626412-573-1-git-send-email-anarcat@koumbit.org","subject":"Re: [PATCH] graph.c: visual difference on subsequent series","fromName":"Antoine Beaupré","fromEmail":"anarcat@koumbit.org","sentAt":"2015-07-27T19:37:26Z","receivedAt":"2015-07-27T19:37:26Z","isPatch":true,"sender":{"key":"anarcat@koumbit.org","avatar":"https://gravatar.com/avatar/d24e4c5d6c70e750da6059fd212c802b241f28b6035db7b4362788ca56b2141a?d=mp&s=160"},"body":"Any reason why this patch wasn't included / reviewed?\n\nThanks,\n\nA.\n\nOn 2014-11-10 08:33:32, Antoine Beaupré wrote:\n> For projects with separate history lines and, thus, multiple root-commits, the\n> linear arrangement of `git log --graph --oneline` does not allow the user to\n> spot where the sequence ends, giving the impression that it's a contiguous\n> history. E.g.\n>\n> History sequence A: a1 -- a2 -- a3 (root-commit)\n> History sequence B: b1 -- b2 -- b3 (root-commit)\n>\n>     git log --graph --oneline\n>     * a1\n>     * a2\n>     * a3\n>     * b1\n>     * b2\n>     * b3\n>\n> In a GUI tool, the root-commit of each series would stand out on the graph.\n>\n> This modification changes the commit char to a different symbol ('o'), so users\n> of the command-line graph tool can easily identify root-commits and make sense\n> of where each series is limited to.\n>\n>     git log --graph --oneline\n>     * a1\n>     * a2\n>     o a3\n>     * b1\n>     * b2\n>     o b3\n>\n> The 'o' character was chosen because it is the same character used in rev-list\n> to mark root commits.\n>\n> This patch is similar than the one provided by Milton Soares Filho in\n> 1382734287.31768.1.git.send.email.milton.soares.filho@gmail.com but was\n> implemented independently and uses the 'o' character instead of 'x'.\n>\n> Other solutions were discarded for those reasons:\n>\n>  * line delimiters: we want to keep one commit per line\n>  * tree indentation: it makes little sense with commit trees without\n>    common history, and is more complicated to implement\n>\n> Signed-off-by: Antoine Beaupré <anarcat@koumbit.org>\n> ---\n>  revision.c                                 |  8 ++++++--\n>  t/t4202-log.sh                             | 10 +++++-----\n>  t/t6016-rev-list-graph-simplify-history.sh | 14 +++++++-------\n>  3 files changed, 18 insertions(+), 14 deletions(-)\n>\n> diff --git a/revision.c b/revision.c\n> index 75dda92..5f21e24 100644\n> --- a/revision.c\n> +++ b/revision.c\n> @@ -3246,8 +3246,12 @@ char *get_revision_mark(const struct rev_info *revs, const struct commit *commit\n>  \t\t\treturn \"<\";\n>  \t\telse\n>  \t\t\treturn \">\";\n> -\t} else if (revs->graph)\n> -\t\treturn \"*\";\n> +\t} else if (revs->graph) {\n> +\t\tif (commit->parents)\n> +\t\t\treturn \"*\";\n> +\t\telse\n> +\t\t\treturn \"o\";\n> +\t}\n>  \telse if (revs->cherry_mark)\n>  \t\treturn \"+\";\n>  \treturn \"\";\n> diff --git a/t/t4202-log.sh b/t/t4202-log.sh\n> index 99ab7ca..d11876e 100755\n> --- a/t/t4202-log.sh\n> +++ b/t/t4202-log.sh\n> @@ -244,7 +244,7 @@ cat > expect <<EOF\n>  * fourth\n>  * third\n>  * second\n> -* initial\n> +o initial\n>  EOF\n>  \n>  test_expect_success 'simple log --graph' '\n> @@ -272,7 +272,7 @@ cat > expect <<\\EOF\n>  |/\n>  * third\n>  * second\n> -* initial\n> +o initial\n>  EOF\n>  \n>  test_expect_success 'log --graph with merge' '\n> @@ -338,7 +338,7 @@ cat > expect <<\\EOF\n>  |\n>  |     second\n>  |\n> -* commit tags/side-1~3\n> +o commit tags/side-1~3\n>    Author: A U Thor <author@example.com>\n>  \n>        initial\n> @@ -410,7 +410,7 @@ cat > expect <<\\EOF\n>  * | third\n>  |/\n>  * second\n> -* initial\n> +o initial\n>  EOF\n>  \n>  test_expect_success 'log --graph with merge' '\n> @@ -799,7 +799,7 @@ cat >expect <<\\EOF\n>  | -one\n>  | +ichi\n>  |\n> -* commit COMMIT_OBJECT_NAME\n> +o commit COMMIT_OBJECT_NAME\n>    Author: A U Thor <author@example.com>\n>  \n>        initial\n> diff --git a/t/t6016-rev-list-graph-simplify-history.sh b/t/t6016-rev-list-graph-simplify-history.sh\n> index f7181d1..74b6fc3 100755\n> --- a/t/t6016-rev-list-graph-simplify-history.sh\n> +++ b/t/t6016-rev-list-graph-simplify-history.sh\n> @@ -81,7 +81,7 @@ test_expect_success '--graph --all' '\n>  \techo \"|/|   \" >> expected &&\n>  \techo \"* | $A2\" >> expected &&\n>  \techo \"|/  \" >> expected &&\n> -\techo \"* $A1\" >> expected &&\n> +\techo \"o $A1\" >> expected &&\n>  \tgit rev-list --graph --all > actual &&\n>  \ttest_cmp expected actual\n>  \t'\n> @@ -111,7 +111,7 @@ test_expect_success '--graph --simplify-by-decoration' '\n>  \techo \"|/|   \" >> expected &&\n>  \techo \"* | $A2\" >> expected &&\n>  \techo \"|/  \" >> expected &&\n> -\techo \"* $A1\" >> expected &&\n> +\techo \"o $A1\" >> expected &&\n>  \tgit rev-list --graph --all --simplify-by-decoration > actual &&\n>  \ttest_cmp expected actual\n>  \t'\n> @@ -139,7 +139,7 @@ test_expect_success '--graph --simplify-by-decoration prune branch B' '\n>  \techo \"* | $A3\" >> expected &&\n>  \techo \"|/  \" >> expected &&\n>  \techo \"* $A2\" >> expected &&\n> -\techo \"* $A1\" >> expected &&\n> +\techo \"o $A1\" >> expected &&\n>  \tgit rev-list --graph --simplify-by-decoration --all > actual &&\n>  \ttest_cmp expected actual\n>  \t'\n> @@ -156,7 +156,7 @@ test_expect_success '--graph --full-history -- bar.txt' '\n>  \techo \"| |/  \" >> expected &&\n>  \techo \"* | $A3\" >> expected &&\n>  \techo \"|/  \" >> expected &&\n> -\techo \"* $A2\" >> expected &&\n> +\techo \"o $A2\" >> expected &&\n>  \tgit rev-list --graph --full-history --all -- bar.txt > actual &&\n>  \ttest_cmp expected actual\n>  \t'\n> @@ -170,7 +170,7 @@ test_expect_success '--graph --full-history --simplify-merges -- bar.txt' '\n>  \techo \"* | $A5\" >> expected &&\n>  \techo \"* | $A3\" >> expected &&\n>  \techo \"|/  \" >> expected &&\n> -\techo \"* $A2\" >> expected &&\n> +\techo \"o $A2\" >> expected &&\n>  \tgit rev-list --graph --full-history --simplify-merges --all \\\n>  \t\t-- bar.txt > actual &&\n>  \ttest_cmp expected actual\n> @@ -183,7 +183,7 @@ test_expect_success '--graph -- bar.txt' '\n>  \techo \"* $A3\" >> expected &&\n>  \techo \"| * $C4\" >> expected &&\n>  \techo \"|/  \" >> expected &&\n> -\techo \"* $A2\" >> expected &&\n> +\techo \"o $A2\" >> expected &&\n>  \tgit rev-list --graph --all -- bar.txt > actual &&\n>  \ttest_cmp expected actual\n>  \t'\n> @@ -201,7 +201,7 @@ test_expect_success '--graph --sparse -- bar.txt' '\n>  \techo \"| * $C1\" >> expected &&\n>  \techo \"|/  \" >> expected &&\n>  \techo \"* $A2\" >> expected &&\n> -\techo \"* $A1\" >> expected &&\n> +\techo \"o $A1\" >> expected &&\n>  \tgit rev-list --graph --sparse --all -- bar.txt > actual &&\n>  \ttest_cmp expected actual\n>  \t'\n> -- \n> 2.1.1\n>\n\n-- \nPour marcher au pas d'une musique militaire, il n'y a pas besoin de\ncerveau, une moelle épinière suffit.\n                        - Albert Enstein\n"},{"id":"266861","messageId":"xmqqegjticd7.fsf@gitster.dls.corp.google.com","threadId":"37925","inReplyTo":"87twspe6ix.fsf@marcos.anarc.at","subject":"Re: [PATCH] graph.c: visual difference on subsequent series","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-07-27T20:17:40Z","receivedAt":"2015-07-27T20:17:40Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Antoine Beaupré <anarcat@koumbit.org> writes:\n\n> Any reason why this patch wasn't included / reviewed?\n> ...\n>> This patch is similar than the one provided by Milton Soares Filho in\n>> 1382734287.31768.1.git.send.email.milton.soares.filho@gmail.com but was\n>> implemented independently and uses the 'o' character instead of 'x'.\n\nThe reason why Milton's patch was not taken after discussion [*1*]\nwas not because its implementation was poor, but its design was not\ngood.  By overriding '*' '<' or '>' with x, it made it impossible to\ndistinguish a root on the left side branch and a root on the right\nside branch.\n\nIs the design of your independent implementation the same except\nthat 'o' is used instead of 'x'?  Independent implementation does\nnot make the same design magically better, if that is the case ;-)\n\nIf the design is different, please explain how your patch solves the\nissue with Milton's design in your log message.\n\nFor example, you could use the column arrangement to solve it, e.g.\n\nHistory sequence A: a1 -- a2 -- a3 (root-commit)\nHistory sequence B: b1 -- b2 -- b3 (root-commit)\n\n    $ git log --graph --oneline A B\n    * a1\n    * a2\n    * a3\n      * b1\n      * b2\n      * b3\n\n    $ git log --graph --oneline --left-right A...B\n    < a1\n    < a2\n    < a3\n      > b1\n      > b2\n      > b3\n\nI am not saying that the above would be the only way to do so; there\nmay be other ways to solve the issue.\n\n[Reference]\n\n*1* http://thread.gmane.org/gmane.comp.version-control.git/236708/focus=236843\n"},{"id":"269295","messageId":"55E7FEF3.2020400@drmicha.warpmail.net","threadId":"37925","inReplyTo":"xmqqegjticd7.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH] graph.c: visual difference on subsequent series","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2015-09-03T08:04:03Z","receivedAt":"2015-09-03T08:04:03Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Junio C Hamano venit, vidit, dixit 27.07.2015 22:17:\n> Antoine Beaupré <anarcat@koumbit.org> writes:\n> \n>> Any reason why this patch wasn't included / reviewed?\n>> ...\n>>> This patch is similar than the one provided by Milton Soares Filho in\n>>> 1382734287.31768.1.git.send.email.milton.soares.filho@gmail.com but was\n>>> implemented independently and uses the 'o' character instead of 'x'.\n> \n> The reason why Milton's patch was not taken after discussion [*1*]\n> was not because its implementation was poor, but its design was not\n> good.  By overriding '*' '<' or '>' with x, it made it impossible to\n> distinguish a root on the left side branch and a root on the right\n> side branch.\n> \n> Is the design of your independent implementation the same except\n> that 'o' is used instead of 'x'?  Independent implementation does\n> not make the same design magically better, if that is the case ;-)\n\nInterestingly, the patch to the tests lists * to o changes only, no < or\n> to o.\n\nThe reason is simply that the patch doesn't change anything for left nor\nright commits. I would say that is the best compromise since it does not\nchange the overall layout, provides more information by default and does\nnot override information that is requested specifically.\n\nIf we want to put more information into log --graph simultaneously we\nshould really go beyond ASCII and look at how tig does it, e.g. using\nunicode characters.\n\n> If the design is different, please explain how your patch solves the\n> issue with Milton's design in your log message.\n> \n> For example, you could use the column arrangement to solve it, e.g.\n> \n> History sequence A: a1 -- a2 -- a3 (root-commit)\n> History sequence B: b1 -- b2 -- b3 (root-commit)\n> \n>     $ git log --graph --oneline A B\n>     * a1\n>     * a2\n>     * a3\n>       * b1\n>       * b2\n>       * b3\n> \n>     $ git log --graph --oneline --left-right A...B\n>     < a1\n>     < a2\n>     < a3\n>       > b1\n>       > b2\n>       > b3\n> \n> I am not saying that the above would be the only way to do so; there\n> may be other ways to solve the issue.\n> \n> [Reference]\n> \n> *1* http://thread.gmane.org/gmane.comp.version-control.git/236708/focus=236843\n> \n"},{"id":"269345","messageId":"xmqq613rl92s.fsf@gitster.mtv.corp.google.com","threadId":"37925","inReplyTo":"55E7FEF3.2020400@drmicha.warpmail.net","subject":"Re: [PATCH] graph.c: visual difference on subsequent series","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-09-03T17:13:47Z","receivedAt":"2015-09-03T17:13:47Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Michael J Gruber <git@drmicha.warpmail.net> writes:\n\n>> Is the design of your independent implementation the same except\n>> that 'o' is used instead of 'x'?  Independent implementation does\n>> not make the same design magically better, if that is the case ;-)\n>\n> Interestingly, the patch to the tests lists * to o changes only, no < or\n>> to o.\n\nWell, in that case, then the opposite but an equivalent problem\nexists in the design, no?  It promises to make roots stand out by\npainting them as 'o', but it sometimes fails to do so.  In other\nwords, ...\n\n> The reason is simply that the patch doesn't change anything for left nor\n> right commits. I would say that is the best compromise since it does not\n> change the overall layout, provides more information by default and does\n> not override information that is requested specifically.\n\n... it fails your last criteria.\n\n> If we want to put more information into log --graph simultaneously we\n> should really go beyond ASCII and look at how tig does it, e.g. using\n> unicode characters.\n\nThat's another way to do so, but shifting columns to show where the\nhistory is not connected also does not change the overall layout,\nprovides more information by default, etc., and a big plus is that\nit would be an approach to do so without having to go beyond ASCII.\n"},{"id":"269422","messageId":"55E9A5B2.5080606@drmicha.warpmail.net","threadId":"37925","inReplyTo":"xmqq613rl92s.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH] graph.c: visual difference on subsequent series","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2015-09-04T14:07:46Z","receivedAt":"2015-09-04T14:07:46Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Junio C Hamano venit, vidit, dixit 03.09.2015 19:13:\n> Michael J Gruber <git@drmicha.warpmail.net> writes:\n> \n>>> Is the design of your independent implementation the same except\n>>> that 'o' is used instead of 'x'?  Independent implementation does\n>>> not make the same design magically better, if that is the case ;-)\n>>\n>> Interestingly, the patch to the tests lists * to o changes only, no < or\n>>> to o.\n> \n> Well, in that case, then the opposite but an equivalent problem\n> exists in the design, no?  It promises to make roots stand out by\n> painting them as 'o', but it sometimes fails to do so.  In other\n> words, ...\n> \n>> The reason is simply that the patch doesn't change anything for left nor\n>> right commits. I would say that is the best compromise since it does not\n>> change the overall layout, provides more information by default and does\n>> not override information that is requested specifically.\n> \n> ... it fails your last criteria.\n\nHow would it? \"--left-right\" information is requested specifically and\nnot overridden. Root information is not requested specifically [by the\nuser].\n\n>> If we want to put more information into log --graph simultaneously we\n>> should really go beyond ASCII and look at how tig does it, e.g. using\n>> unicode characters.\n> \n> That's another way to do so, but shifting columns to show where the\n> history is not connected also does not change the overall layout,\n> provides more information by default, etc., and a big plus is that\n> it would be an approach to do so without having to go beyond ASCII.\n\nThat would consume more horizontal space and annoy at least some people.\nAlternatively, we could use more vertical space and annoy at least some\n(other?) people.\n\nIn fact, I tend to think that horizontal space is more \"precious\" than\nvertical space due to the common orientation of scrolling...\n\nIf we don't mind an increase in vertical spacing there are more issues\nthat could be solved, for example the merge point description sticking\nvisually to the commits above rather than the merged branch in the\ntypical old..new scenario.\n\nIn fact, both issues would be solved be adding an extra line after a\nroot commit (be it \"real\" root or boundary-wise).\n\nMichael\n"},{"id":"269429","messageId":"xmqq37yugobh.fsf@gitster.mtv.corp.google.com","threadId":"37925","inReplyTo":"55E9A5B2.5080606@drmicha.warpmail.net","subject":"Re: [PATCH] graph.c: visual difference on subsequent series","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-09-04T16:08:02Z","receivedAt":"2015-09-04T16:08:02Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Michael J Gruber <git@drmicha.warpmail.net> writes:\n\n> How would it? \"--left-right\" information is requested specifically and\n> not overridden. Root information is not requested specifically [by the\n> user].\n\nIf this \"highlight root prominently\" were a config, then using both\nconfig and --left-right would mean one of them needs to give.  If\nthis were always on, then the act of the user running \"git log\"\nalone is a sign that the user explicitly asked the log to be shown\nwith the new world order, i.e. the root is promised to be shown\nvisible.  Either way, the user is not getting what s/he asked.\n\n>>> If we want to put more information into log --graph simultaneously we\n>>> should really go beyond ASCII and look at how tig does it, e.g. using\n>>> unicode characters.\n>> \n>> That's another way to do so, but shifting columns to show where the\n>> history is not connected also does not change the overall layout,\n>> provides more information by default, etc., and a big plus is that\n>> it would be an approach to do so without having to go beyond ASCII.\n>\n> That would consume more horizontal space and annoy at least some people.\n\nI sense that we are working from different perceptions of what\n\"shifting columns\" should look like.\n\nA history that reaches two roots would be shown like this, with or\nwithout any special treatment for root:\n\n * tip\n |\\\n | * tip of the side branch\n * | tip of the trunk\n * | second of the trunk\n * | root of the trunk\n   * second of the side branch\n   * root of the side branch\n\nso it does not give us any more \"wasted space\" issue with or without\n\"showing root more prominently\".\n\nThe case where we would see differences is to have two or more\ntotally disjoint histories.  But \"shifting columns\" does not have to\ndraw that case like this:\n\n * tip of history A\n | * tip of history B\n * | second of history A\n * | root of history A\n   * second of history B\n   * third of history B\n   * fourth of history B\n   * fifth of history B\n   * root of history B\n\nIt can do this instead to save horizontal space (which I agree with\nyou is the more precious one than the vertical one):\n\n * tip of history A\n | * tip of history B\n * | second of history A\n * | root of history A\n   * second of history B\n  /\n * third of history B\n * fourth of history B\n * fifth of history B\n * root of history B\n\nIt does spend more space around the root of each history (in this\ncase, history A) when it shifts the column for history B to the\nspace now vacated by history A in order to save horizontal space.\nBut drawing the graph around the root differently from other parts\nis exactly to show roots more prominently; it draws the users' eyes.\n\nHere is another example of drawing the same history.  If the\ntraversal is topologica:, \"shifting columns\" does not have to draw\nthis:\n\n * tip of history A\n * second of history A\n * root of history A\n   * tip of history B\n   * second of history B\n   * third of history B\n   * fourth of history B\n   * fifth of history B\n   * root of history B\n\nIt can do this instead:\n\n * tip of history A\n * second of history A\n * root of history A\n   * tip of history B\n  /\n * second of history B\n * third of history B\n * fourth of history B\n * fifth of history B\n * root of history B\n\nAgain I am not saying that \"shifting columns\" is the only way we can\ndo this, and there may be other ways to do this without losing\ninformation.  Going beyond ASCII as you hinted would be one example.\n"}]}