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

6 messages from 2008-02-06 to 2008-02-10. Participants: Bruno Ribas, Jakub Narebski, Bruno Cesar Ribas, Junio C Hamano.
Thread: https://gitlist.dev/t/11920

## Bruno Ribas, 2008-02-06 17:15

Subject: [PATCH] gitweb: Make use of the $git_dir variable at sub git_get_project_url_list
Message-ID: <1202318112-8223-1-git-send-email-ribas@c3sl.ufpr.br>
URL: https://gitlist.dev/e/1202318112-8223-1-git-send-email-ribas%40c3sl.ufpr.br

```

Signed-off-by: Bruno Ribas <ribas@c3sl.ufpr.br>
---
 gitweb/gitweb.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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, 2008-02-06 19:37

Subject: Re: [PATCH] gitweb: Make use of the $git_dir variable at sub git_get_project_url_list
Message-ID: <m3ve51511t.fsf@localhost.localdomain>
URL: https://gitlist.dev/e/m3ve51511t.fsf%40localhost.localdomain
In-Reply-To: <1202318112-8223-1-git-send-email-ribas@c3sl.ufpr.br>

```
Bruno Ribas <ribas@c3sl.ufpr.br> writes:

> @@ -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, 2008-02-08 04:15

Subject: Re: [PATCH] gitweb: Make use of the $git_dir variable at sub git_get_project_url_list
Message-ID: <20080208041542.GA28336@c3sl.ufpr.br>
URL: https://gitlist.dev/e/20080208041542.GA28336%40c3sl.ufpr.br
In-Reply-To: <m3ve51511t.fsf@localhost.localdomain>

```
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 =)
> 
> -- 
> 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, 2008-02-08 06:21

Subject: Re: [PATCH] gitweb: Make use of the $git_dir variable at sub git_get_project_url_list
Message-ID: <7vbq6sm0j3.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vbq6sm0j3.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <20080208041542.GA28336@c3sl.ufpr.br>

```
Bruno Cesar Ribas <ribas@c3sl.ufpr.br> writes:

> 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, 2008-02-08 09:15

Subject: Re: [PATCH] gitweb: Make use of the $git_dir variable at sub git_get_project_url_list
Message-ID: <200802081015.39707.jnareb@gmail.com>
URL: https://gitlist.dev/e/200802081015.39707.jnareb%40gmail.com
In-Reply-To: <7vbq6sm0j3.fsf@gitster.siamese.dyndns.org>

```
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.

-- 
Jakub Narebski
Poland

```

## Bruno Cesar Ribas, 2008-02-10 02:46

Subject: Re: [PATCH] gitweb: Make use of the $git_dir variable at sub git_get_project_url_list
Message-ID: <20080210024611.GA31577@c3sl.ufpr.br>
URL: https://gitlist.dev/e/20080210024611.GA31577%40c3sl.ufpr.br
In-Reply-To: <200802081015.39707.jnareb@gmail.com>

```
On Fri, Feb 08, 2008 at 10:15:39AM +0100, Jakub Narebski wrote:
> 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 

```
