threads / patch / 11920

patchgitweb: Make use of the $git_dir variable at sub git_get_project_url_list

Subject: [PATCH] gitweb: Make use of the $git_dir variable at sub git_get_project_url_list

## tl;dr

6 messages between Feb 6, 2008 and Feb 10, 2008. Diffs are folded; open one to read it.

replies: 5people: 3as markdown or json

Bruno Ribas· Feb 6, 2008, 17:15 UTC · lore
Signed-off-by: Bruno Ribas <ribas@c3sl.ufpr.br>
---
 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 ae2d057..0cb3cb0 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1620,7 +1620,7 @@ sub git_get_project_url_list {
 	my $path = shift;
 
 	$git_dir = "$projectroot/$path";
-	open my $fd, "$projectroot/$path/cloneurl"
+	open my $fd, "$git_dir/cloneurl"
 		or return wantarray ?
 		@{ config_to_multi(git_get_project_config('url')) } :
 		   config_to_multi(git_get_project_config('url'));
-- 
1.5.4.23.gef5b9
Jakub Narebski· Feb 6, 2008, 19:37 UTC · re: Bruno Ribas · lore

Re: [PATCH] gitweb: Make use of the $git_dir variable at sub git_get_project_url_list

Bruno Ribas <ribas@c3sl.ufpr.br> writes:
Show 9 quoted lines
> @@ -1620,7 +1620,7 @@ sub git_get_project_url_list {
>  	my $path = shift;
>  
>  	$git_dir = "$projectroot/$path";
> -	open my $fd, "$projectroot/$path/cloneurl"
> +	open my $fd, "$git_dir/cloneurl"
>  		or return wantarray ?
>  		@{ config_to_multi(git_get_project_config('url')) } :
>  		   config_to_multi(git_get_project_config('url'));
Good catch (although it wasn't actually a bug).
-- 
Jakub Narebski
Poland
ShadeHawk on #git
Bruno Cesar Ribas· Feb 8, 2008, 04:15 UTC · re: Jakub Narebski · lore

Re: [PATCH] gitweb: Make use of the $git_dir variable at sub git_get_project_url_list

Just Remembering
On Wed, Feb 06, 2008 at 11:37:51AM -0800, Jakub Narebski wrote:
> Bruno Ribas <ribas@c3sl.ufpr.br> writes:
><snip> 
> Good catch (although it wasn't actually a bug).
Not a bug but makes the code cleaner =)
Show 9 quoted lines
> 
> -- 
> Jakub Narebski
> Poland
> ShadeHawk on #git
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-- 
Bruno Ribas - ribas@c3sl.ufpr.br
http://web.inf.ufpr.br/ribas
C3SL: http://www.c3sl.ufpr.br 
Junio C Hamano· Feb 8, 2008, 06:21 UTC · re: Bruno Cesar Ribas · lore

Re: [PATCH] gitweb: Make use of the $git_dir variable at sub git_get_project_url_list

Bruno Cesar Ribas <ribas@c3sl.ufpr.br> writes:
Show 8 quoted lines
> Just Remembering
>
> On Wed, Feb 06, 2008 at 11:37:51AM -0800, Jakub Narebski wrote:
>> Bruno Ribas <ribas@c3sl.ufpr.br> writes:
>><snip> 
>> Good catch (although it wasn't actually a bug).
>
> Not a bug but makes the code cleaner =)

I think I saw very similar 's|projectroot/$path|$git_dir|' patch recently. If there are more of the same, I'd rather see all of them in a single patch.

Jakub Narebski· Feb 8, 2008, 09:15 UTC · re: Junio C Hamano · lore

Re: [PATCH] gitweb: Make use of the $git_dir variable at sub git_get_project_url_list

Junio C Hamano wrote:
Show 13 quoted lines
> Bruno Cesar Ribas <ribas@c3sl.ufpr.br> writes:
>> On Wed, Feb 06, 2008 at 11:37:51AM -0800, Jakub Narebski wrote:
>>> Bruno Ribas <ribas@c3sl.ufpr.br> writes:
>>>
>>><snip> 
>>>
>>> Good catch (although it wasn't actually a bug).
>>
>> Not a bug but makes the code cleaner =)
> 
> I think I saw very similar 's|projectroot/$path|$git_dir|' patch
> recently.  If there are more of the same, I'd rather see all of
> them in a single patch.

That's all that it is. Those patches are about places where we read file inside repo or get repo config, and there are only two places now: description and cloneurl/URL list.

-- 
Jakub Narebski
Poland
Bruno Cesar Ribas· Feb 10, 2008, 02:46 UTC · re: Jakub Narebski · lore

Re: [PATCH] gitweb: Make use of the $git_dir variable at sub git_get_project_url_list

On Fri, Feb 08, 2008 at 10:15:39AM +0100, Jakub Narebski wrote:
Show 18 quoted lines
> Junio C Hamano wrote:
> > Bruno Cesar Ribas <ribas@c3sl.ufpr.br> writes:
> >> On Wed, Feb 06, 2008 at 11:37:51AM -0800, Jakub Narebski wrote:
> >>> Bruno Ribas <ribas@c3sl.ufpr.br> writes:
> >>>
> >>><snip> 
> >>>
> >>> Good catch (although it wasn't actually a bug).
> >>
> >> Not a bug but makes the code cleaner =)
> > 
> > I think I saw very similar 's|projectroot/$path|$git_dir|' patch
> > recently.  If there are more of the same, I'd rather see all of
> > them in a single patch.
> 
> That's all that it is. Those patches are about places where we read
> file inside repo or get repo config, and there are only two places now: 
> description and cloneurl/URL list.
And (if added) at the owner's place ;)
> 
> -- 
> Jakub Narebski
> Poland
-- 
Bruno Ribas - ribas@c3sl.ufpr.br
http://web.inf.ufpr.br/ribas
C3SL: http://www.c3sl.ufpr.br 

← back to recent threads