{"thread":{"id":"21207","subject":"[PATCH] Let --decorate show HEAD position","startedAt":"2009-10-12T09:01:51Z","lastAt":"2009-10-12T21:11:10Z","messageCount":5,"participants":["Thomas Rast","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"124680","messageId":"4c70c935ab67266684aa14e38e276795cf1776db.1255337211.git.trast@student.ethz.ch","threadId":"21207","inReplyTo":null,"subject":"[PATCH] Let --decorate show HEAD position","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2009-10-12T09:01:51Z","receivedAt":"2009-10-12T09:01:51Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"'git log --graph --oneline --decorate --all' is a useful way to get a\ngeneral overview of the repository state, similar to 'gitk --all'.\nLet it indicate the position of HEAD by loading that ref too, so that\nthe --decorate code can see it.\n\nSigned-off-by: Thomas Rast <trast@student.ethz.ch>\n---\n log-tree.c |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/log-tree.c b/log-tree.c\nindex 1618f3c..f7d54f2 100644\n--- a/log-tree.c\n+++ b/log-tree.c\n@@ -43,6 +43,7 @@ void load_ref_decorations(int flags)\n \tif (!loaded) {\n \t\tloaded = 1;\n \t\tfor_each_ref(add_ref_decoration, &flags);\n+\t\thead_ref(add_ref_decoration, &flags);\n \t}\n }\n \n-- \n1.6.5.59.g76726.dirty\n"},{"id":"124742","messageId":"200910122206.23044.trast@student.ethz.ch","threadId":"21207","inReplyTo":"4c70c935ab67266684aa14e38e276795cf1776db.1255337211.git.trast@student.ethz.ch","subject":"Re: [PATCH] Let --decorate show HEAD position","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2009-10-12T20:06:21Z","receivedAt":"2009-10-12T20:06:21Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Thomas Rast wrote:\n> diff --git a/log-tree.c b/log-tree.c\n> index 1618f3c..f7d54f2 100644\n> --- a/log-tree.c\n> +++ b/log-tree.c\n> @@ -43,6 +43,7 @@ void load_ref_decorations(int flags)\n>  \tif (!loaded) {\n>  \t\tloaded = 1;\n>  \t\tfor_each_ref(add_ref_decoration, &flags);\n> +\t\thead_ref(add_ref_decoration, &flags);\n>  \t}\n>  }\n\nDamn, this fails tests and I only just noticed while testing another\nseries.  Sorry for the noise, reroll upcoming...\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"124745","messageId":"36861d16d0e21c662430882140893ad9a0b2fb25.1255379242.git.trast@student.ethz.ch","threadId":"21207","inReplyTo":"200910122206.23044.trast@student.ethz.ch","subject":"[PATCH v2] Let --decorate show HEAD position","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2009-10-12T20:34:12Z","receivedAt":"2009-10-12T20:34:12Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"'git log --graph --oneline --decorate --all' is a useful way to get a\ngeneral overview of the repository state, similar to 'gitk --all'.\nLet it indicate the position of HEAD by loading that ref too, so that\nthe --decorate code can see it.\n\nSigned-off-by: Thomas Rast <trast@student.ethz.ch>\n---\n\nI wrote:\n> Damn, this fails tests and I only just noticed while testing another\n> series.  Sorry for the noise, reroll upcoming...\n\n\n log-tree.c                             |    1 +\n t/t4013/diff.log_--decorate=full_--all |    2 +-\n t/t4013/diff.log_--decorate_--all      |    2 +-\n 3 files changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/log-tree.c b/log-tree.c\nindex 1618f3c..f7d54f2 100644\n--- a/log-tree.c\n+++ b/log-tree.c\n@@ -43,6 +43,7 @@ void load_ref_decorations(int flags)\n \tif (!loaded) {\n \t\tloaded = 1;\n \t\tfor_each_ref(add_ref_decoration, &flags);\n+\t\thead_ref(add_ref_decoration, &flags);\n \t}\n }\n \ndiff --git a/t/t4013/diff.log_--decorate=full_--all b/t/t4013/diff.log_--decorate=full_--all\nindex 903d9d9..d155e0b 100644\n--- a/t/t4013/diff.log_--decorate=full_--all\n+++ b/t/t4013/diff.log_--decorate=full_--all\n@@ -1,5 +1,5 @@\n $ git log --decorate=full --all\n-commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (refs/heads/master)\n+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD, refs/heads/master)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:04:00 2006 +0000\ndiff --git a/t/t4013/diff.log_--decorate_--all b/t/t4013/diff.log_--decorate_--all\nindex 954210e..fd7c3e6 100644\n--- a/t/t4013/diff.log_--decorate_--all\n+++ b/t/t4013/diff.log_--decorate_--all\n@@ -1,5 +1,5 @@\n $ git log --decorate --all\n-commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (master)\n+commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD, master)\n Merge: 9a6d494 c7a2ab9\n Author: A U Thor <author@example.com>\n Date:   Mon Jun 26 00:04:00 2006 +0000\n-- \n1.6.5.62.g4370d.dirty\n"},{"id":"124747","messageId":"7vk4z0e31e.fsf@alter.siamese.dyndns.org","threadId":"21207","inReplyTo":"36861d16d0e21c662430882140893ad9a0b2fb25.1255379242.git.trast@student.ethz.ch","subject":"Re: [PATCH v2] Let --decorate show HEAD position","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-10-12T21:05:33Z","receivedAt":"2009-10-12T21:05:33Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thomas Rast <trast@student.ethz.ch> writes:\n\n> 'git log --graph --oneline --decorate --all' is a useful way to get a\n> general overview of the repository state, similar to 'gitk --all'.\n> Let it indicate the position of HEAD by loading that ref too, so that\n> the --decorate code can see it.\n>\n> Signed-off-by: Thomas Rast <trast@student.ethz.ch>\n> ---\n\nI think this makes sense.\n\nI see HEAD is given at the front in the sample output, which I think also\nmakes sense.  Is it because it is pushed the last?  If so, the same commit\nat the tip of branch alpha and beta are decorated with beta and then\nalpha, I have to wonder...?\n\n>\n> I wrote:\n>> Damn, this fails tests and I only just noticed while testing another\n>> series.  Sorry for the noise, reroll upcoming...\n>\n>\n>  log-tree.c                             |    1 +\n>  t/t4013/diff.log_--decorate=full_--all |    2 +-\n>  t/t4013/diff.log_--decorate_--all      |    2 +-\n>  3 files changed, 3 insertions(+), 2 deletions(-)\n>\n> diff --git a/log-tree.c b/log-tree.c\n> index 1618f3c..f7d54f2 100644\n> --- a/log-tree.c\n> +++ b/log-tree.c\n> @@ -43,6 +43,7 @@ void load_ref_decorations(int flags)\n>  \tif (!loaded) {\n>  \t\tloaded = 1;\n>  \t\tfor_each_ref(add_ref_decoration, &flags);\n> +\t\thead_ref(add_ref_decoration, &flags);\n>  \t}\n>  }\n>  \n> diff --git a/t/t4013/diff.log_--decorate=full_--all b/t/t4013/diff.log_--decorate=full_--all\n> index 903d9d9..d155e0b 100644\n> --- a/t/t4013/diff.log_--decorate=full_--all\n> +++ b/t/t4013/diff.log_--decorate=full_--all\n> @@ -1,5 +1,5 @@\n>  $ git log --decorate=full --all\n> -commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (refs/heads/master)\n> +commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD, refs/heads/master)\n>  Merge: 9a6d494 c7a2ab9\n>  Author: A U Thor <author@example.com>\n>  Date:   Mon Jun 26 00:04:00 2006 +0000\n> diff --git a/t/t4013/diff.log_--decorate_--all b/t/t4013/diff.log_--decorate_--all\n> index 954210e..fd7c3e6 100644\n> --- a/t/t4013/diff.log_--decorate_--all\n> +++ b/t/t4013/diff.log_--decorate_--all\n> @@ -1,5 +1,5 @@\n>  $ git log --decorate --all\n> -commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (master)\n> +commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD, master)\n>  Merge: 9a6d494 c7a2ab9\n>  Author: A U Thor <author@example.com>\n>  Date:   Mon Jun 26 00:04:00 2006 +0000\n> -- \n> 1.6.5.62.g4370d.dirty\n"},{"id":"124757","messageId":"200910122311.12106.trast@student.ethz.ch","threadId":"21207","inReplyTo":"7vk4z0e31e.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH v2] Let --decorate show HEAD position","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2009-10-12T21:11:10Z","receivedAt":"2009-10-12T21:11:10Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Junio C Hamano wrote:\n> \n> I see HEAD is given at the front in the sample output, which I think also\n> makes sense.  Is it because it is pushed the last?  If so, the same commit\n> at the tip of branch alpha and beta are decorated with beta and then\n> alpha, I have to wonder...?\n\nIndeed.  I wrote this off as a lucky coincidence coming from HEAD\nsorting before any lowercase letters, but it's exactly as you say:\n\n  commit a0f7579d38feb8c4d87282a6cecbc6778908f19f (test-b, test-a, next)\n  Merge: 01287fd 548bc3a\n  Author: Thomas Rast <trast@student.ethz.ch>\n  [...]\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"}]}