Re: [PATCH 3/3] gitweb: A bit of code cleanup in git_blame()
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Dec 10, 2008, 02:13 UTC
- Message-ID
- <ghn8jv$hg9$1@ger.gmane.org>
- In-Reply-To
- <20081209224814.28106.83387.stgit@localhost.localdomain>
Jakub Narebski wrote:
I'm sorry, there should be
+ my $ftype = "blob";
Show 8 quoted lines
> if (!defined $hash) {
> $hash = git_get_hash_by_path($hash_base, $file_name, "blob")
> or die_error(404, "Error looking up file");
> + } else {
> + $ftype = git_get_type($hash);
> + if ($ftype !~ "blob") {
> + die_error(400, "Object is not a blob");
> + }-- Jakub Narebski Warsaw, Poland ShadeHawk on #git