git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bruno Cesar Ribas <ribas@c3sl.ufpr.br>
To: git@vger.kernel.org
Cc: gitster@pobox.com
Subject: Re: [PATCH] gitweb: Use the config file to set repository owner's name.
Date: Tue, 12 Feb 2008 22:52:02 -0200	[thread overview]
Message-ID: <20080213005202.GA5965@c3sl.ufpr.br> (raw)
In-Reply-To: <1202488684-13266-2-git-send-email-ribas@c3sl.ufpr.br>

Was it forgotten ? 8^)

On Fri, Feb 08, 2008 at 02:38:03PM -0200, Bruno Ribas wrote:
> Now gitweb checks if gitweb.owner exists before trying to get filesystem's
> owner.
> 
> Allow to use configuration variable gitweb.owner set the repository owner,
> it checks the gitweb.owner, if not set it uses filesystem directory's owner.
> 
> Useful when we don't want to maintain project list file, and all
> repository directories have to have the same owner (for example when the
> same SSH account is shared for all projects, using ssh_acl to control
> access instead).
> 
> Signed-off-by: Bruno Ribas <ribas@c3sl.ufpr.br>
> ---
>  gitweb/gitweb.perl |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
> 
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index 8ef2735..c8fe22a 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -1759,6 +1759,7 @@ sub git_get_project_owner {
>  	my $owner;
>  
>  	return undef unless $project;
> +	$git_dir = "$projectroot/$project";
>  
>  	if (!defined $gitweb_project_owner) {
>  		git_get_project_list_from_file();
> @@ -1767,8 +1768,11 @@ sub git_get_project_owner {
>  	if (exists $gitweb_project_owner->{$project}) {
>  		$owner = $gitweb_project_owner->{$project};
>  	}
> +	if (!defined $owner){
> +		$owner = git_get_project_config('owner');
> +	}
>  	if (!defined $owner) {
> -		$owner = get_file_owner("$projectroot/$project");
> +		$owner = get_file_owner("$git_dir");
>  	}
>  
>  	return $owner;
> -- 
> 1.5.4.24.gce08d

-- 
Bruno Ribas - ribas@c3sl.ufpr.br
http://web.inf.ufpr.br/ribas
C3SL: http://www.c3sl.ufpr.br 

  parent reply	other threads:[~2008-02-13  0:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-08 16:38 git.owner, hope everything is fine Bruno Ribas
2008-02-08 16:38 ` [PATCH] gitweb: Use the config file to set repository owner's name Bruno Ribas
2008-02-08 16:38   ` [PATCH] gitweb: Update gitweb/README to include the new per-repository gitweb.owner Bruno Ribas
2008-02-13  0:52   ` Bruno Cesar Ribas [this message]
2008-02-13  1:05     ` [PATCH] gitweb: Use the config file to set repository owner's name Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2008-02-08  4:41 Adding gitweb.owner, last shot Bruno Ribas
2008-02-08  4:41 ` [PATCH] gitweb: Use the config file to set repository owner's name Bruno Ribas
2008-02-08 10:55   ` Jakub Narebski
2008-02-08 13:53     ` Bruno Cesar Ribas
2008-02-08 14:30       ` Bruno Cesar Ribas
2008-02-08 15:33         ` Jakub Narebski
2008-02-08 16:07           ` Bruno Cesar Ribas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080213005202.GA5965@c3sl.ufpr.br \
    --to=ribas@c3sl.ufpr.br \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).