threads / patch / 6205

patchgitweb: Fix error in git_project_index subroutine

Subject: [PATCH] gitweb: Fix error in git_project_index subroutine

## tl;dr

One message between Jan 3, 2007 and Jan 3, 2007. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Jakub Narebski· Jan 3, 2007, 15:03 UTC · lore

Instead of "$projectroot/$pr->{'path'}" to get the path to project GIT_DIR, it was used "$projectroot/$project" which is valid only for actions where project parameter is set, and 'project_index' is not one of them.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
 gitweb/gitweb.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to gitweb/gitweb.perl +1 −1
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index d845e91..7f54834 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2995,7 +2995,7 @@ sub git_project_index {
 
 	foreach my $pr (@projects) {
 		if (!exists $pr->{'owner'}) {
-			$pr->{'owner'} = get_file_owner("$projectroot/$project");
+			$pr->{'owner'} = get_file_owner("$projectroot/$pr->{'path'}");
 		}
 
 		my ($path, $owner) = ($pr->{'path'}, $pr->{'owner'});
-- 
1.4.4.3

← back to recent threads