From b8d97b0bfaab54993a1d066fa994f71557abea29 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Tue, 7 Aug 2007 02:52:25 +0200 Subject: [PATCH] Make alternates paths absolute instead of relative Git cannot handle multi-level relative paths. Discovered by Johannes Schindelin. --- cgi/Git/RepoCGI.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cgi/Git/RepoCGI.pm b/cgi/Git/RepoCGI.pm index efdc589..4278866 100644 --- a/cgi/Git/RepoCGI.pm +++ b/cgi/Git/RepoCGI.pm @@ -325,10 +325,10 @@ sub _alternates_setup { open X, '>'.$filename or die "alternates failed: $!"; # We use relative URL here so that http-fetch groks it automagically. $forkee_name =~ s#^.*/##; # Only the last element of the path matters, again. - print X "../../../$forkee_name.git/objects\n"; + print X "$forkee_path/objects\n"; close X; chmod 0664, $filename or warn "cannot chmod $filename: $!"; - symlink "../../../$forkee_name.git/refs", $self->{path}.'/refs/forkee'; + symlink "$forkee_path/refs", $self->{path}.'/refs/forkee'; } sub _group_add { -- 2.11.4.GIT