{"thread":{"id":"5209","subject":"[PATCH] gitweb: Different colours for tags and heads","startedAt":"2006-08-11T15:12:24Z","lastAt":"2006-08-14T05:22:38Z","messageCount":6,"participants":["Thomas Kolejka","Jakub Narebski","Junio C Hamano","Martin Waitz"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"25131","messageId":"20060811151224.177110@gmx.net","threadId":"5209","inReplyTo":null,"subject":"[PATCH] gitweb: Different colours for tags and heads","fromName":"Thomas Kolejka","fromEmail":"thomas.kolejka@gmx.at","sentAt":"2006-08-11T15:12:24Z","receivedAt":"2006-08-11T15:12:24Z","isPatch":true,"sender":{"key":"thomas.kolejka@gmx.at","avatar":null},"body":"Hello,\n\nwith the following patch there are different colours for tags\nand heads in gitweb. So you can easily differentiate between \nthem.\n\n\nCommit ca9e3b124f6313187da641b5cd55100c4ade6a9a\n\n----\n\ndiff --git a/gitweb/gitweb.css b/gitweb/gitweb.css\nindex 47c1ade..c47cbf4 100644\n--- a/gitweb/gitweb.css\n+++ b/gitweb/gitweb.css\n@@ -330,6 +330,15 @@ span.tag {\n \tborder-color: #ffffcc #ffee00 #ffee00 #ffffcc;\n }\n \n+span.head {\n+\tpadding: 0px 4px;\n+\tfont-size: 10px;\n+\tfont-weight: normal;\n+\tbackground-color: #aaaaff;\n+\tborder: 1px solid;\n+\tborder-color: #ccccff #0033cc #0033cc #ccccff;\n+}\n+\n span.atnight {\n \tcolor: #cc0000;\n }\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 626fcc9..755b0b1 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -363,10 +363,10 @@ sub format_log_line_html {\n \n # format marker of refs pointing to given object\n sub git_get_referencing {\n-\tmy ($refs, $id) = @_;\n+\tmy ($refs, $id, $class) = @_;\n \n \tif (defined $refs->{$id}) {\n-\t\treturn ' <span class=\"tag\">' . esc_html($refs->{$id}) . '</span>';\n+\t\treturn \" <span class=\\\"$class\\\">\" . esc_html($refs->{$id}) . \"</span>\";\n \t} else {\n \t\treturn \"\";\n \t}\n@@ -1054,7 +1054,7 @@ ## functions printing large fragments of\n \n sub git_shortlog_body {\n \t# uses global variable $project\n-\tmy ($revlist, $from, $to, $refs, $extra) = @_;\n+\tmy ($revlist, $from, $to, $refs, $heads, $extra) = @_;\n \t$from = 0 unless defined $from;\n \t$to = $#{$revlist} if (!defined $to || $#{$revlist} < $to);\n \n@@ -1062,8 +1062,9 @@ sub git_shortlog_body {\n \tmy $alternate = 0;\n \tfor (my $i = $from; $i <= $to; $i++) {\n \t\tmy $commit = $revlist->[$i];\n-\t\t#my $ref = defined $refs ? git_get_referencing($refs, $commit) : '';\n-\t\tmy $ref = git_get_referencing($refs, $commit);\n+\t\t#my $ref = defined $refs ? git_get_referencing($refs, $commit, \"tag\") : '';\n+\t\tmy $ref = git_get_referencing($refs, $commit, \"tag\");\n+\t\tmy $head = git_get_referencing($heads, $commit, \"head\");\n \t\tmy %co = git_read_commit($commit);\n \t\tif ($alternate) {\n \t\t\tprint \"<tr class=\\\"dark\\\">\\n\";\n@@ -1078,11 +1079,11 @@ sub git_shortlog_body {\n \t\tif (length($co{'title_short'}) < length($co{'title'})) {\n \t\t\tprint $cgi->a({-href => \"$my_uri?\" . esc_param(\"p=$project;a=commit;h=$commit\"),\n \t\t\t               -class => \"list\", -title => \"$co{'title'}\"},\n-\t\t\t      \"<b>\" . esc_html($co{'title_short'}) . \"$ref</b>\");\n+\t\t\t      \"<b>\" . esc_html($co{'title_short'}) . \"$ref $head</b>\");\n \t\t} else {\n \t\t\tprint $cgi->a({-href => \"$my_uri?\" . esc_param(\"p=$project;a=commit;h=$commit\"),\n \t\t\t               -class => \"list\"},\n-\t\t\t      \"<b>\" . esc_html($co{'title'}) . \"$ref</b>\");\n+\t\t\t      \"<b>\" . esc_html($co{'title'}) . \"$ref $head</b>\");\n \t\t}\n \t\tprint \"</td>\\n\" .\n \t\t      \"<td class=\\\"link\\\">\" .\n@@ -1407,7 +1408,8 @@ sub git_summary {\n \t\t$owner = get_file_owner(\"$projectroot/$project\");\n \t}\n \n-\tmy $refs = read_info_ref();\n+\tmy $refs = read_info_ref(\"tags\");\n+\tmy $heads = read_info_ref(\"heads\");\n \tgit_header_html();\n \tgit_page_nav('summary','', $head);\n \n@@ -1423,7 +1425,7 @@ sub git_summary {\n \tmy @revlist = map { chomp; $_ } <$fd>;\n \tclose $fd;\n \tgit_header_div('shortlog');\n-\tgit_shortlog_body(\\@revlist, 0, 15, $refs,\n+\tgit_shortlog_body(\\@revlist, 0, 15, $refs, $heads,\n \t                  $cgi->a({-href => \"$my_uri?\" . esc_param(\"p=$project;a=shortlog\")}, \"...\"));\n \n \tmy $taglist = git_read_refs(\"refs/tags\");\n@@ -1746,8 +1748,10 @@ sub git_tree {\n \tclose $fd or die_error(undef, \"Reading tree failed\");\n \t$/ = \"\\n\";\n \n-\tmy $refs = read_info_ref();\n-\tmy $ref = git_get_referencing($refs, $hash_base);\n+\tmy $refs = read_info_ref(\"tags\");\n+\tmy $heads = read_info_ref(\"heads\");\n+\tmy $ref = git_get_referencing($refs, $hash_base, \"tag\");\n+\tmy $head = git_get_referencing($heads, $hash_base, \"head\");\n \tgit_header_html();\n \tmy $base_key = \"\";\n \tmy $base = \"\";\n@@ -1755,7 +1759,7 @@ sub git_tree {\n \tif (defined $hash_base && (my %co = git_read_commit($hash_base))) {\n \t\t$base_key = \";hb=$hash_base\";\n \t\tgit_page_nav('tree','', $hash_base);\n-\t\tgit_header_div('commit', esc_html($co{'title'}) . $ref, $hash_base);\n+\t\tgit_header_div('commit', esc_html($co{'title'}) . $ref . $head, $hash_base);\n \t} else {\n \t\tprint \"<div class=\\\"page_nav\\\">\\n\";\n \t\tprint \"<br/><br/></div>\\n\";\n@@ -1818,7 +1822,8 @@ sub git_log {\n \tif (!defined $page) {\n \t\t$page = 0;\n \t}\n-\tmy $refs = read_info_ref();\n+\tmy $refs = read_info_ref(\"tags\");\n+\tmy $heads = read_info_ref(\"heads\");\n \n \tmy $limit = sprintf(\"--max-count=%i\", (100 * ($page+1)));\n \topen my $fd, \"-|\", $GIT, \"rev-list\", $limit, $hash\n@@ -1839,13 +1844,14 @@ sub git_log {\n \t}\n \tfor (my $i = ($page * 100); $i <= $#revlist; $i++) {\n \t\tmy $commit = $revlist[$i];\n-\t\tmy $ref = git_get_referencing($refs, $commit);\n+\t\tmy $ref = git_get_referencing($refs, $commit, \"tag\");\n+\t\tmy $head = git_get_referencing($heads, $commit, \"head\");\n \t\tmy %co = git_read_commit($commit);\n \t\tnext if !%co;\n \t\tmy %ad = date_str($co{'author_epoch'});\n \t\tgit_header_div('commit',\n \t\t               \"<span class=\\\"age\\\">$co{'age_string'}</span>\" .\n-\t\t               esc_html($co{'title'}) . $ref,\n+\t\t               esc_html($co{'title'}) . $ref . $head,\n \t\t               $commit);\n \t\tprint \"<div class=\\\"title_text\\\">\\n\" .\n \t\t      \"<div class=\\\"log_link\\\">\\n\" .\n@@ -1902,8 +1908,10 @@ sub git_commit {\n \tif ($hash =~ m/^[0-9a-fA-F]{40}$/) {\n \t\t$expires = \"+1d\";\n \t}\n-\tmy $refs = read_info_ref();\n-\tmy $ref = git_get_referencing($refs, $co{'id'});\n+\tmy $refs = read_info_ref(\"tags\");\n+\tmy $heads = read_info_ref(\"heads\");\n+\tmy $ref = git_get_referencing($refs, $co{'id'}, \"tag\");\n+\tmy $head = git_get_referencing($heads, $co{'id'}, \"head\");\n \tmy $formats_nav = '';\n \tif (defined $file_name && defined $co{'parent'}) {\n \t\tmy $parent = $co{'parent'};\n@@ -1915,9 +1923,9 @@ sub git_commit {\n \t             $formats_nav);\n \n \tif (defined $co{'parent'}) {\n-\t\tgit_header_div('commitdiff', esc_html($co{'title'}) . $ref, $hash);\n+\t\tgit_header_div('commitdiff', esc_html($co{'title'}) . $ref . $head, $hash);\n \t} else {\n-\t\tgit_header_div('tree', esc_html($co{'title'}) . $ref, $co{'tree'}, $hash);\n+\t\tgit_header_div('tree', esc_html($co{'title'}) . $ref . $head, $co{'tree'}, $hash);\n \t}\n \tprint \"<div class=\\\"title_text\\\">\\n\" .\n \t      \"<table cellspacing=\\\"0\\\">\\n\";\n@@ -2126,13 +2134,15 @@ sub git_commitdiff {\n \tif ($hash =~ m/^[0-9a-fA-F]{40}$/) {\n \t\t$expires = \"+1d\";\n \t}\n-\tmy $refs = read_info_ref();\n-\tmy $ref = git_get_referencing($refs, $co{'id'});\n+\tmy $refs = read_info_ref(\"tags\");\n+\tmy $heads = read_info_ref(\"heads\");\n+\tmy $ref = git_get_referencing($refs, $co{'id'}, \"tag\");\n+\tmy $head = git_get_referencing($heads, $co{'id'}, \"head\");\n \tmy $formats_nav =\n \t\t$cgi->a({-href => \"$my_uri?\" . esc_param(\"p=$project;a=commitdiff_plain;h=$hash;hp=$hash_parent\")}, \"plain\");\n \tgit_header_html(undef, $expires);\n \tgit_page_nav('commitdiff','', $hash,$co{'tree'},$hash, $formats_nav);\n-\tgit_header_div('commit', esc_html($co{'title'}) . $ref, $hash);\n+\tgit_header_div('commit', esc_html($co{'title'}) . $ref . $head, $hash);\n \tprint \"<div class=\\\"page_body\\\">\\n\";\n \tmy $comment = $co{'comment'};\n \tmy $empty = 0;\n@@ -2271,7 +2281,8 @@ sub git_history {\n \tif (!%co) {\n \t\tdie_error(undef, \"Unknown commit object\");\n \t}\n-\tmy $refs = read_info_ref();\n+\tmy $refs = read_info_ref(\"tags\");\n+\tmy $heads = read_info_ref(\"heads\");\n \tgit_header_html();\n \tgit_page_nav('','', $hash_base,$co{'tree'},$hash_base);\n \tgit_header_div('commit', esc_html($co{'title'}), $hash_base);\n@@ -2294,7 +2305,8 @@ sub git_history {\n \t\t\tif (!%co) {\n \t\t\t\tnext;\n \t\t\t}\n-\t\t\tmy $ref = git_get_referencing($refs, $commit);\n+\t\t\tmy $ref = git_get_referencing($refs, $commit, \"tag\");\n+\t\t\tmy $head = git_get_referencing($heads, $commit, \"head\");\n \t\t\tif ($alternate) {\n \t\t\t\tprint \"<tr class=\\\"dark\\\">\\n\";\n \t\t\t} else {\n@@ -2304,7 +2316,7 @@ sub git_history {\n \t\t\tprint \"<td title=\\\"$co{'age_string_age'}\\\"><i>$co{'age_string_date'}</i></td>\\n\" .\n \t\t\t      \"<td><i>\" . esc_html(chop_str($co{'author_name'}, 15, 3)) . \"</i></td>\\n\" .\n \t\t\t      \"<td>\" . $cgi->a({-href => \"$my_uri?\" . esc_param(\"p=$project;a=commit;h=$commit\"), -class => \"list\"}, \"<b>\" .\n-\t\t\t      esc_html(chop_str($co{'title'}, 50)) . \"$ref</b>\") . \"</td>\\n\" .\n+\t\t\t      esc_html(chop_str($co{'title'}, 50)) . $ref . $head . \"</b>\") . \"</td>\\n\" .\n \t\t\t      \"<td class=\\\"link\\\">\" .\n \t\t\t      $cgi->a({-href => \"$my_uri?\" . esc_param(\"p=$project;a=commit;h=$commit\")}, \"commit\") .\n \t\t\t      \" | \" . $cgi->a({-href => \"$my_uri?\" . esc_param(\"p=$project;a=commitdiff;h=$commit\")}, \"commitdiff\") .\n@@ -2468,7 +2480,8 @@ sub git_shortlog {\n \tif (!defined $page) {\n \t\t$page = 0;\n \t}\n-\tmy $refs = read_info_ref();\n+\tmy $refs = read_info_ref(\"tags\");\n+\tmy $heads = read_info_ref(\"heads\");\n \n \tmy $limit = sprintf(\"--max-count=%i\", (100 * ($page+1)));\n \topen my $fd, \"-|\", $GIT, \"rev-list\", $limit, $hash\n@@ -2489,7 +2502,7 @@ sub git_shortlog {\n \tgit_page_nav('shortlog','', $hash,$hash,$hash, $paging_nav);\n \tgit_header_div('summary', $project);\n \n-\tgit_shortlog_body(\\@revlist, ($page * 100), $#revlist, $refs, $next_link);\n+\tgit_shortlog_body(\\@revlist, ($page * 100), $#revlist, $refs, $heads, $next_link);\n \n \tgit_footer_html();\n }\n\n----\n\n\nBye,\nThomas\n-- \n\n\nDer GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!\nIdeal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer\n"},{"id":"25134","messageId":"ebi81l$qu$1@sea.gmane.org","threadId":"5209","inReplyTo":"20060811151224.177110@gmx.net","subject":"Re: [PATCH] gitweb: Different colours for tags and heads","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-08-11T15:34:42Z","receivedAt":"2006-08-11T15:34:42Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Thomas Kolejka wrote:\n\n> Hello,\n> \n> with the following patch there are different colours for tags\n> and heads in gitweb. So you can easily differentiate between \n> them.\n> \n> Commit ca9e3b124f6313187da641b5cd55100c4ade6a9a\n\nBased on which branch? Master, next? Which commit?\n\nBy the way, please do not put \"Hello,\" in the commit message\npart of patch. You can put your comments (like which branch\nand/or commit is the batch based on) either after \"---\" and\nbefore the patch itself, or at the beginning and separate them\nfrom the commit message by \"+++\" (this separator is supported\nby git tools, but some people use \"-- >8 --\" 'scissors' separator).\ngit-format-patch helps in correct formatting, and adds diffstat.\n\nYou would also be most probably asked to sign your patches, i.e.\nadd\n  Signed-off-by: Thomas Kolejka <Thomas.Kolejka@gmx.at>\nline at the end of commit message.\n\n\nI have send patch of similar nature:\n  \"[PATCH 5/5] gitweb: Change appereance of marker of refs pointing to given object\"\n  http://permalink.gmane.org/gmane.comp.version-control.git/24860\nin which I split marker for refs poining to given object into\nseparate span elements. The patch was dropped because it followed\nfirst version of \"Great subroutine renames\" patch.\n\nI've planned on patch which does something similar to\nyours, but in slightly different way: instead of two calls \nto git_get_referencing (format_mark_referencing[*1*] after rename)\nand two calls to read_info_ref (git_get_references after rename)\nin your patch, read_info_ref would always add full name, of\nwhich first component is the type of the tag.\n\nI am wondering if to do this like in my abovementioned patch,\nputting references in single string, separated by ':' (':' cannot\nbe part of valid ref name), or use array (anonymous array reference\nto be more exact). \n\n\n[*1*] Do you have better proposal for this name? Perhaps\nformat_referencing_marker, or just format_marker?\n\n---\n>  # format marker of refs pointing to given object\n>  sub git_get_referencing {\n> -     my ($refs, $id) = @_;\n> +     my ($refs, $id, $class) = @_;\n>  \n>       if (defined $refs->{$id}) {\n> -             return ' <span class=\"tag\">' . esc_html($refs->{$id}) . '</span>';\n> +             return \" <span class=\\\"$class\\\">\" . esc_html($refs->{$id}) . \"</span>\";\n>       } else {\n>               return \"\";\n>       }\n[...]\n> -     my ($revlist, $from, $to, $refs, $extra) = @_;\n> +     my ($revlist, $from, $to, $refs, $heads, $extra) = @_;\n[...]\n> -             #my $ref = defined $refs ? git_get_referencing($refs, $commit) : '';\n> -             my $ref = git_get_referencing($refs, $commit);\n> +             #my $ref = defined $refs ? git_get_referencing($refs, $commit, \"tag\") : '';\n> +             my $ref = git_get_referencing($refs, $commit, \"tag\");\n> +             my $head = git_get_referencing($heads, $commit, \"head\");\n\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"25142","messageId":"7vodurrlg8.fsf@assigned-by-dhcp.cox.net","threadId":"5209","inReplyTo":"ebi81l$qu$1@sea.gmane.org","subject":"Re: [PATCH] gitweb: Different colours for tags and heads","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-08-11T21:50:31Z","receivedAt":"2006-08-11T21:50:31Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jakub Narebski <jnareb@gmail.com> writes:\n\n> By the way, please do not put \"Hello,\" in the commit message\n> part of patch. You can put your comments (like which branch\n> and/or commit is the batch based on) either after \"---\" and\n> before the patch itself, or at the beginning and separate them\n> from the commit message by \"+++\" (this separator is supported\n> by git tools,...\n\n???\n\n> I've planned on patch which does something similar to\n> yours, but in slightly different way: instead of two calls \n> to git_get_referencing (format_mark_referencing[*1*] after rename)\n> and two calls to read_info_ref (git_get_references after rename)\n> in your patch, read_info_ref would always add full name, of\n> which first component is the type of the tag.\n\nget_referencing to get, and format_ref to format perhaps?\n\n> I am wondering if to do this like in my abovementioned patch,\n> putting references in single string, separated by ':' (':' cannot\n> be part of valid ref name), or use array (anonymous array reference\n> to be more exact). \n\nTwo things and half come to mind.\n\nget_referencing could get and return the full refname without\nabbreviation ('heads/jn/web' or 'tags/v1.0'), and the caller can\ndo whatever with them (e.g. see what the name begins with to\ntell heads and tags apart).  This is probably the most flexible\nif we do not want to cast the categorization of refs in stone.\n\nOtherwise, return an arrayref, like ['tag', 'v1.0', 'v1.0'] or\n['head', 'web', 'jn/web'], to say what kind, short name and full\nname.\n\nI've always wondered if the span that shows the short refname\ncould have an on-hover pop-up (title attribute is often shown\nthat way) to show the full name.  Then you could do something\nlike:\n\n    $long_name = 'heads/jn/web'; # or 'tags/v1.0'\n    $kind = ($long_name =~ /^heads/) ? 'head' : 'tag';\n    $long_name = s|^[^/]*/||;\n    ($short_name = $long_name) =~ s|.*/||;\n    $long_name = esc_html($long_name);\n    $short_name = esc_html($short_name);\n    return \" <span class='$kind' title='$long_name'>$short_name</span>\";\n"},{"id":"25146","messageId":"ebj6c3$4cj$1@sea.gmane.org","threadId":"5209","inReplyTo":"7vodurrlg8.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] gitweb: Different colours for tags and heads","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-08-12T00:12:19Z","receivedAt":"2006-08-12T00:12:19Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Junio C Hamano wrote:\n\n> Jakub Narebski <jnareb@gmail.com> writes:\n\n>> I've planned on patch which does something similar to\n>> yours, but in slightly different way: instead of two calls \n>> to git_get_referencing (format_mark_referencing[*1*] after rename)\n>> and two calls to read_info_ref (git_get_references after rename)\n>> in your patch, read_info_ref would always add full name, of\n>> which first component is the type of the tag.\n> \n> get_referencing to get, and format_ref to format perhaps?\n\nThanks for a suggestion. I've decided on git_get_references, and\nformat_ref_marker,but it isn't cast in stone.\n \n>> I am wondering if to do this like in my abovementioned patch,\n>> putting references in single string, separated by ':' (':' cannot\n>> be part of valid ref name), or use array (anonymous array reference\n>> to be more exact). \n> \n> Two things and half come to mind.\n> \n> get_referencing could get and return the full refname without\n> abbreviation ('heads/jn/web' or 'tags/v1.0'), and the caller can\n> do whatever with them (e.g. see what the name begins with to\n> tell heads and tags apart).  This is probably the most flexible\n> if we do not want to cast the categorization of refs in stone.\n> \n> Otherwise, return an arrayref, like ['tag', 'v1.0', 'v1.0'] or\n> ['head', 'web', 'jn/web'], to say what kind, short name and full\n> name.\n\nPerhaps I have not said things clearly. The problem I meant to solve is the\nfact that there might be more than one ref pointing to a given object.\nCurrently read_info_ref does not its job joining references pointing to\ngiven object (referenced object is key of a hash) using \" / \", i.e.\ncreating the \"joined tag\".\n\nIn dropped patch I've mentioned I joined references using ':' as it can't be\npart of valid ref name, then split it on ':' on formatting.\n\nBut they can be put into anonymous arrayref (e.g. ['heads/next',\n'heads/autoconf'] at the start of 'autoconf' branch, or ['heads/master',\n'heads/next', 'tags/v1.4.2'], not 'heads/master:heads/next:tags/v1.4.2'\nmy patch did.\n\n> I've always wondered if the span that shows the short refname\n> could have an on-hover pop-up (title attribute is often shown\n> that way) to show the full name.  Then you could do something\n> like:\n> \n>     $long_name = 'heads/jn/web'; # or 'tags/v1.0'\n>     $kind = ($long_name =~ /^heads/) ? 'head' : 'tag';\n>     $long_name = s|^[^/]*/||;\n>     ($short_name = $long_name) =~ s|.*/||;\n>     $long_name = esc_html($long_name);\n>     $short_name = esc_html($short_name);\n>     return \" <span class='$kind' title='$long_name'>$short_name</span>\";\n\nCurrently (in core-git) besides 'heads' and 'tags' there might be\n'remotes' (when using --use-separate-remote' option of git-clone), all\nfollowing the rule of being plural (in English) to the type of tag, so one\ncould use\n        $ref =~ m|(^[^/])*s?/|;\n        $kind = $1;\nfor kind.\n\nBy the way, is it really usefull to have shortened ref name, e.g. 'web' for\n'jn/web'? That is what gitweb does currently (only without giving ling name\nat all). It is probably bad practice, but I've had branches ab/sth and\nzz/sth, with the same shortname.\n\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"25148","messageId":"7v4pwisrap.fsf@assigned-by-dhcp.cox.net","threadId":"5209","inReplyTo":"ebj6c3$4cj$1@sea.gmane.org","subject":"Re: [PATCH] gitweb: Different colours for tags and heads","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-08-12T00:58:54Z","receivedAt":"2006-08-12T00:58:54Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jakub Narebski <jnareb@gmail.com> writes:\n\n> But they can be put into anonymous arrayref (e.g. ['heads/next',\n> 'heads/autoconf'] at the start of 'autoconf' branch, or ['heads/master',\n> 'heads/next', 'tags/v1.4.2'], not 'heads/master:heads/next:tags/v1.4.2'\n> my patch did.\n\nConcatenating them with ':' into a single string, only to later\nsplit it, sounds simply stupid; I'd go for arrayref if I were\nyou.\n\n> By the way, is it really usefull to have shortened ref name, e.g. 'web' for\n> 'jn/web'? That is what gitweb does currently (only without giving ling name\n> at all). It is probably bad practice, but I've had branches ab/sth and\n> zz/sth, with the same shortname.\n\nI think most people tend to use unique refs, so maybe showing\nthe shortname by default and unique suffix when ambiguous (that\nwould end up always showing minimal unique suffix) would be\nreasonable.\n"},{"id":"25218","messageId":"20060814052238.GA11970@admingilde.org","threadId":"5209","inReplyTo":"7vodurrlg8.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] gitweb: Different colours for tags and heads","fromName":"Martin Waitz","fromEmail":"tali@admingilde.org","sentAt":"2006-08-14T05:22:38Z","receivedAt":"2006-08-14T05:22:38Z","isPatch":true,"sender":{"key":"tali@admingilde.org","avatar":"https://gravatar.com/avatar/3f89b03eee362187effabe257898735b475673a12265c398ea9161259ae91553?d=mp&s=160"},"body":"hoi :)\n\nOn Fri, Aug 11, 2006 at 02:50:31PM -0700, Junio C Hamano wrote:\n> Jakub Narebski <jnareb@gmail.com> writes:\n> > By the way, please do not put \"Hello,\" in the commit message\n> > part of patch. You can put your comments (like which branch\n> > and/or commit is the batch based on) either after \"---\" and\n> > before the patch itself, or at the beginning and separate them\n> > from the commit message by \"+++\" (this separator is supported\n> > by git tools,...\n> \n> ???\n\nthe +++ feature has never been accepted for GIT.\n\n-- \nMartin Waitz\n"}]}