* [PATCH] Avoid git-rev-parse warnings in gitweb blame
@ 2008-06-03 10:14 Rafael Garcia-Suarez
2008-06-03 10:14 ` [PATCH] Make cell alignment more robust " Rafael Garcia-Suarez
2008-06-03 10:26 ` [PATCH] Avoid git-rev-parse warnings " Rafael Garcia-Suarez
0 siblings, 2 replies; 3+ messages in thread
From: Rafael Garcia-Suarez @ 2008-06-03 10:14 UTC (permalink / raw)
To: git; +Cc: Rafael Garcia-Suarez
Adding a '--' to the command-line avoids git-rev-parse emitting an error
message "ambiguous argument... Use '--' to separate paths from revisions".
Signed-off-by: Rafael Garcia-Suarez <rgarciasuarez@gmail.com>
---
gitweb/gitweb.perl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 55fb100..472326f 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -4226,7 +4226,7 @@ HTML
esc_html($rev));
print "</td>\n";
}
- open (my $dd, "-|", git_cmd(), "rev-parse", "$full_rev^")
+ open (my $dd, "-|", git_cmd(), "rev-parse", '--', "$full_rev^")
or die_error(undef, "Open git-rev-parse failed");
my $parent_commit = <$dd>;
close $dd;
--
1.5.6.rc1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] Make cell alignment more robust in gitweb blame
2008-06-03 10:14 [PATCH] Avoid git-rev-parse warnings in gitweb blame Rafael Garcia-Suarez
@ 2008-06-03 10:14 ` Rafael Garcia-Suarez
2008-06-03 10:26 ` [PATCH] Avoid git-rev-parse warnings " Rafael Garcia-Suarez
1 sibling, 0 replies; 3+ messages in thread
From: Rafael Garcia-Suarez @ 2008-06-03 10:14 UTC (permalink / raw)
To: git; +Cc: Rafael Garcia-Suarez
It appears that git-blame's returned group size can be wrong,
inducing the table display to be completely broken.
For gitweb to cope with that in a more robust manner, we can
drop the "rowspan" argument to the first <td> containing
the blame commit id, and just put empty cells instead,
whenever we have nothing to print in that column.
Signed-off-by: Rafael Garcia-Suarez <rgarciasuarez@gmail.com>
---
gitweb/gitweb.perl | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 472326f..c760884 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -4218,7 +4218,6 @@ HTML
if ($group_size) {
print "<td class=\"sha1\"";
print " title=\"". esc_html($author) . ", $date\"";
- print " rowspan=\"$group_size\"" if ($group_size > 1);
print ">";
print $cgi->a({-href => href(action=>"commit",
hash=>$full_rev,
@@ -4226,6 +4225,9 @@ HTML
esc_html($rev));
print "</td>\n";
}
+ else {
+ print "<td class=\"sha1\"> </td>";
+ }
open (my $dd, "-|", git_cmd(), "rev-parse", '--', "$full_rev^")
or die_error(undef, "Open git-rev-parse failed");
my $parent_commit = <$dd>;
--
1.5.6.rc1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Avoid git-rev-parse warnings in gitweb blame
2008-06-03 10:14 [PATCH] Avoid git-rev-parse warnings in gitweb blame Rafael Garcia-Suarez
2008-06-03 10:14 ` [PATCH] Make cell alignment more robust " Rafael Garcia-Suarez
@ 2008-06-03 10:26 ` Rafael Garcia-Suarez
1 sibling, 0 replies; 3+ messages in thread
From: Rafael Garcia-Suarez @ 2008-06-03 10:26 UTC (permalink / raw)
To: git
2008/6/3 Rafael Garcia-Suarez <rgarciasuarez@gmail.com>:
> Adding a '--' to the command-line avoids git-rev-parse emitting an error
> message "ambiguous argument... Use '--' to separate paths from revisions".
Oh, well, scratch that. I'm (now obviously to me) trying to hide a bug
under the carpet here. Sorry for the noise.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-06-03 10:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-03 10:14 [PATCH] Avoid git-rev-parse warnings in gitweb blame Rafael Garcia-Suarez
2008-06-03 10:14 ` [PATCH] Make cell alignment more robust " Rafael Garcia-Suarez
2008-06-03 10:26 ` [PATCH] Avoid git-rev-parse warnings " Rafael Garcia-Suarez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).