summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dda754f)
raw | patch | inline | side by side (parent: dda754f)
author | Jakub Narebski <jnareb@gmail.com> | |
Sat, 29 Jul 2006 21:01:00 +0000 (23:01 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 31 Jul 2006 01:34:47 +0000 (18:34 -0700) |
Use more explicit error messages when failing magical "-|" open,
stating at least the name of the git command that failed.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
stating at least the name of the git command that failed.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
gitweb/gitweb.cgi | patch | blob | history |
diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi
index 9c214f534b3b5248100202b47893af442ec40fd5..bf3e2ca5d13d870513d3250026ac31fc754a1337 100755 (executable)
--- a/gitweb/gitweb.cgi
+++ b/gitweb/gitweb.cgi
"<tr><td>last change</td><td>$cd{'rfc2822'}</td></tr>\n" .
"</table>\n";
open my $fd, "-|", $GIT, "rev-list", "--max-count=17", git_read_head($project)
- or die_error(undef, "Open failed.");
+ or die_error(undef, "Open git-rev-list failed.");
my (@revlist) = map { chomp; $_ } <$fd>;
close $fd;
print "<div>\n" .
die_error("400 Bad Request", "object is not a blob");
}
open ($fd, "-|", $GIT, "blame", '-l', $file_name, $hash_base)
- or die_error(undef, "Open failed");
+ or die_error(undef, "Open git-blame failed.");
git_header_html();
print "<div class=\"page_nav\">\n" .
$cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=summary")}, "summary") .
or die_error(undef, "Error lookup file.");
}
open ($fd, "-|", $GIT, "annotate", '-l', '-t', '-r', $file_name, $hash_base)
- or die_error(undef, "Open failed.");
+ or die_error(undef, "Open git-annotate failed.");
git_header_html();
print "<div class=\"page_nav\">\n" .
$cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=summary")}, "summary") .
}
}
my $type = shift;
- open my $fd, "-|", $GIT, "cat-file", "blob", $hash or die_error("Couldn't cat $file_name, $hash");
+ open my $fd, "-|", $GIT, "cat-file", "blob", $hash
+ or die_error("Couldn't cat $file_name, $hash");
$type ||= git_blob_plain_mimetype($fd, $file_name);
}
}
my $have_blame = git_get_project_config_bool ('blame');
- open my $fd, "-|", $GIT, "cat-file", "blob", $hash or die_error(undef, "Open failed.");
+ open my $fd, "-|", $GIT, "cat-file", "blob", $hash
+ or die_error(undef, "Couldn't cat $file_name, $hash.");
my $mimetype = git_blob_plain_mimetype($fd, $file_name);
if ($mimetype !~ m/^text\//) {
close $fd;
}
}
$/ = "\0";
- open my $fd, "-|", $GIT, "ls-tree", '-z', $hash or die_error(undef, "Open git-ls-tree failed.");
+ open my $fd, "-|", $GIT, "ls-tree", '-z', $hash
+ or die_error(undef, "Open git-ls-tree failed.");
chomp (my (@entries) = <$fd>);
close $fd or die_error(undef, "Reading tree failed.");
$/ = "\n";
sub git_rss {
# http://www.notestips.com/80256B3A007F2692/1/NAMO5P9UPQ
open my $fd, "-|", $GIT, "rev-list", "--max-count=150", git_read_head($project)
- or die_error(undef, "Open failed.");
+ or die_error(undef, "Open git-rev-list failed.");
my (@revlist) = map { chomp; $_ } <$fd>;
close $fd or die_error(undef, "Reading rev-list failed.");
print $cgi->header(-type => 'text/xml', -charset => 'utf-8');
" | " . $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=tree;h=$hash;hb=$hash")}, "tree") . "<br/>\n";
my $limit = sprintf("--max-count=%i", (100 * ($page+1)));
- open my $fd, "-|", $GIT, "rev-list", $limit, $hash or die_error(undef, "Open failed.");
+ open my $fd, "-|", $GIT, "rev-list", $limit, $hash
+ or die_error(undef, "Open git-rev-list failed.");
my (@revlist) = map { chomp; $_ } <$fd>;
close $fd;
$parent = "--root";
}
open my $fd, "-|", $GIT, "diff-tree", '-r', '-M', $parent, $hash
- or die_error(undef, "Open failed.");
+ or die_error(undef, "Open git-diff-tree failed.");
@difftree = map { chomp; $_ } <$fd>;
close $fd or die_error(undef, "Reading git-diff-tree failed.");
$hash_parent = $co{'parent'};
}
open my $fd, "-|", $GIT, "diff-tree", '-r', $hash_parent, $hash
- or die_error(undef, "Open failed.");
+ or die_error(undef, "Open git-diff-tree failed.");
my (@difftree) = map { chomp; $_ } <$fd>;
close $fd or die_error(undef, "Reading diff-tree failed.");
sub git_commitdiff_plain {
mkdir($git_temp, 0700);
open my $fd, "-|", $GIT, "diff-tree", '-r', $hash_parent, $hash
- or die_error(undef, "Open failed.");
+ or die_error(undef, "Open git-diff-tree failed.");
my (@difftree) = map { chomp; $_ } <$fd>;
close $fd or die_error(undef, "Reading diff-tree failed.");
" | " . $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=tree;h=$hash;hb=$hash")}, "tree") . "<br/>\n";
my $limit = sprintf("--max-count=%i", (100 * ($page+1)));
- open my $fd, "-|", $GIT, "rev-list", $limit, $hash or die_error(undef, "Open failed.");
+ open my $fd, "-|", $GIT, "rev-list", $limit, $hash
+ or die_error(undef, "Open git-rev-list failed.");
my (@revlist) = map { chomp; $_ } <$fd>;
close $fd;