Re: [PATCH] gitweb: Use the config file to set repository owner's name.
- From
- Bruno Cesar Ribas <ribas@c3sl.ufpr.br>
- Date
- Feb 8, 2008, 14:30 UTC
- Message-ID
- <20080208143027.GA707@c3sl.ufpr.br>
- In-Reply-To
- <20080208135327.GC30264@c3sl.ufpr.br>
On Fri, Feb 08, 2008 at 11:53:27AM -0200, Bruno Cesar Ribas wrote:
Show 21 quoted lines
> On Fri, Feb 08, 2008 at 02:55:33AM -0800, Jakub Narebski wrote:
> > Bruno Ribas <ribas@c3sl.ufpr.br> writes:
> >
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index 8ef2735..e8a43b7 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -1767,7 +1767,12 @@ sub git_get_project_owner {
> if (exists $gitweb_project_owner->{$project}) {
> $owner = $gitweb_project_owner->{$project};
> }
> - if (!defined $owner) {
> +
> + if (!defined $owner){
> + $owner = git_get_project_config('owner');
> + }
> +
> + if (!$owner) {
> $owner = get_file_owner("$projectroot/$project");
> }
>I that last 3lines should be inside the block that we call git_get_project_config, don't you think?
Show 23 quoted lines
> > First, I think the empty lines added are not needed. > > I made those empty lines because original code had same empty lines above, I > just let it to have same pattern, but I can remove. Should I remove?! I'll > resend without it, and with $git_dir set. > > > > Second, git_get_project_config() subroutine _REQUIRES_ for $git_dir to > > be set. So you have to set $git_dir before checking repo config; then > > you can reuse $git_dir in checking file owner. > > > > -- > > Jakub Narebski > > Poland > > ShadeHawk on #git > > -- > Bruno Ribas - ribas@c3sl.ufpr.br > http://web.inf.ufpr.br/ribas > C3SL: http://www.c3sl.ufpr.br > - > 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