gitweb: Cleanup and uniquify error messages
Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Jakub Narebski committed
Aug 5, 2006 at 13:12 UTC
e484a2d6ad26ff7a6ebe84085dda00591476014e
1 file changed
+6
-6
gitweb/gitweb.perl
+6
-6
@@ -1464,7 +1464,7 @@ sub git_blame2 {
1464
die_error(undef, "Permission denied.") if (!git_get_project_config_bool ('blame'));
1465
die_error('404 Not Found', "File name not defined") if (!$file_name);
1466
$hash_base ||= git_read_head($project);
1467
- die_error(undef, "Reading commit failed") unless ($hash_base);
1467
+ die_error(undef, "Couldn't find base commit.") unless ($hash_base);
1468
my %co = git_read_commit($hash_base)
1469
or die_error(undef, "Reading commit failed");
1470
if (!defined $hash) {
@@ -1473,7 +1473,7 @@ sub git_blame2 {
1473
}
1474
$ftype = git_get_type($hash);
1475
if ($ftype !~ "blob") {
1476
- die_error("400 Bad Request", "object is not a blob");
1476
+ die_error("400 Bad Request", "Object is not a blob");
1477
}
1478
open ($fd, "-|", $GIT, "blame", '-l', $file_name, $hash_base)
1479
or die_error(undef, "Open git-blame failed.");
@@ -1520,9 +1520,9 @@ sub git_blame2 {
1520
sub git_blame {
1521
my $fd;
1522
die_error('403 Permission denied', "Permission denied.") if (!git_get_project_config_bool ('blame'));
1523
- die_error('404 Not Found', "What file will it be, master?") if (!$file_name);
1523
+ die_error('404 Not Found', "File name not defined.") if (!$file_name);
1524
$hash_base ||= git_read_head($project);
1525
- die_error(undef, "Reading commit failed.") unless ($hash_base);
1525
+ die_error(undef, "Couldn't find base commit.") unless ($hash_base);
1526
my %co = git_read_commit($hash_base)
1527
or die_error(undef, "Reading commit failed.");
1528
if (!defined $hash) {
@@ -2116,7 +2116,7 @@ sub git_commitdiff {
2116
open my $fd, "-|", $GIT, "diff-tree", '-r', $hash_parent, $hash
2117
or die_error(undef, "Open git-diff-tree failed.");
2118
my @difftree = map { chomp; $_ } <$fd>;
2119
- close $fd or die_error(undef, "Reading diff-tree failed.");
2119
+ close $fd or die_error(undef, "Reading git-diff-tree failed.");
2120
2121
# non-textual hash id's can be cached
2122
my $expires;
@@ -2487,7 +2487,7 @@ sub git_rss {
2487
open my $fd, "-|", $GIT, "rev-list", "--max-count=150", git_read_head($project)
2488
or die_error(undef, "Open git-rev-list failed.");
2489
my @revlist = map { chomp; $_ } <$fd>;
2490
- close $fd or die_error(undef, "Reading rev-list failed.");
2490
+ close $fd or die_error(undef, "Reading git-rev-list failed.");
2491
print $cgi->header(-type => 'text/xml', -charset => 'utf-8');
2492
print "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n".
2493
"<rss version=\"2.0\" xmlns:content=\"http://purl.org/rss/1.0/modules/content/\">\n";