{"thread":{"id":"13774","subject":"[PATCH] Make cell alignment more robust in gitweb blame","startedAt":"2008-06-03T10:14:19Z","lastAt":"2008-06-03T10:26:18Z","messageCount":3,"participants":["Rafael Garcia-Suarez"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"78474","messageId":"1212488060-23251-1-git-send-email-rgarciasuarez@gmail.com","threadId":"13774","inReplyTo":null,"subject":"[PATCH] Avoid git-rev-parse warnings in gitweb blame","fromName":"Rafael Garcia-Suarez","fromEmail":"rgarciasuarez@gmail.com","sentAt":"2008-06-03T10:14:19Z","receivedAt":"2008-06-03T10:14:19Z","isPatch":true,"sender":{"key":"rgarciasuarez@gmail.com","avatar":null},"body":"Adding a '--' to the command-line avoids git-rev-parse emitting an error\nmessage \"ambiguous argument... Use '--' to separate paths from revisions\".\n\nSigned-off-by: Rafael Garcia-Suarez <rgarciasuarez@gmail.com>\n---\n gitweb/gitweb.perl |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 55fb100..472326f 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -4226,7 +4226,7 @@ HTML\n \t\t\t              esc_html($rev));\n \t\t\tprint \"</td>\\n\";\n \t\t}\n-\t\topen (my $dd, \"-|\", git_cmd(), \"rev-parse\", \"$full_rev^\")\n+\t\topen (my $dd, \"-|\", git_cmd(), \"rev-parse\", '--', \"$full_rev^\")\n \t\t\tor die_error(undef, \"Open git-rev-parse failed\");\n \t\tmy $parent_commit = <$dd>;\n \t\tclose $dd;\n-- \n1.5.6.rc1\n"},{"id":"78473","messageId":"1212488060-23251-2-git-send-email-rgarciasuarez@gmail.com","threadId":"13774","inReplyTo":"1212488060-23251-1-git-send-email-rgarciasuarez@gmail.com","subject":"[PATCH] Make cell alignment more robust in gitweb blame","fromName":"Rafael Garcia-Suarez","fromEmail":"rgarciasuarez@gmail.com","sentAt":"2008-06-03T10:14:20Z","receivedAt":"2008-06-03T10:14:20Z","isPatch":true,"sender":{"key":"rgarciasuarez@gmail.com","avatar":null},"body":"It appears that git-blame's returned group size can be wrong,\ninducing the table display to be completely broken.\n\nFor gitweb to cope with that in a more robust manner, we can\ndrop the \"rowspan\" argument to the first <td> containing\nthe blame commit id, and just put empty cells instead,\nwhenever we have nothing to print in that column.\n\nSigned-off-by: Rafael Garcia-Suarez <rgarciasuarez@gmail.com>\n---\n gitweb/gitweb.perl |    4 +++-\n 1 files changed, 3 insertions(+), 1 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 472326f..c760884 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -4218,7 +4218,6 @@ HTML\n \t\tif ($group_size) {\n \t\t\tprint \"<td class=\\\"sha1\\\"\";\n \t\t\tprint \" title=\\\"\". esc_html($author) . \", $date\\\"\";\n-\t\t\tprint \" rowspan=\\\"$group_size\\\"\" if ($group_size > 1);\n \t\t\tprint \">\";\n \t\t\tprint $cgi->a({-href => href(action=>\"commit\",\n \t\t\t                             hash=>$full_rev,\n@@ -4226,6 +4225,9 @@ HTML\n \t\t\t              esc_html($rev));\n \t\t\tprint \"</td>\\n\";\n \t\t}\n+\t\telse {\n+\t\t\tprint \"<td class=\\\"sha1\\\">&nbsp;</td>\";\n+\t\t}\n \t\topen (my $dd, \"-|\", git_cmd(), \"rev-parse\", '--', \"$full_rev^\")\n \t\t\tor die_error(undef, \"Open git-rev-parse failed\");\n \t\tmy $parent_commit = <$dd>;\n-- \n1.5.6.rc1\n"},{"id":"78475","messageId":"b77c1dce0806030326m54850dabic58e519b494093ce@mail.gmail.com","threadId":"13774","inReplyTo":"1212488060-23251-1-git-send-email-rgarciasuarez@gmail.com","subject":"Re: [PATCH] Avoid git-rev-parse warnings in gitweb blame","fromName":"Rafael Garcia-Suarez","fromEmail":"rgarciasuarez@gmail.com","sentAt":"2008-06-03T10:26:18Z","receivedAt":"2008-06-03T10:26:18Z","isPatch":true,"sender":{"key":"rgarciasuarez@gmail.com","avatar":null},"body":"2008/6/3 Rafael Garcia-Suarez <rgarciasuarez@gmail.com>:\n> Adding a '--' to the command-line avoids git-rev-parse emitting an error\n> message \"ambiguous argument... Use '--' to separate paths from revisions\".\n\nOh, well, scratch that. I'm (now obviously to me) trying to hide a bug\nunder the carpet here. Sorry for the noise.\n"}]}