From: Jakub Narebski <jnareb@gmail.com>
To: Bruno Ribas <ribas@c3sl.ufpr.br>
Cc: git@vger.kernel.org, gitster@pobox.com,
Git Managment for C3SL <git@git.c3sl.ufpr.br>
Subject: Re: [PATCH] gitweb: Use the config file to set repository owner's name.
Date: Fri, 08 Feb 2008 02:55:33 -0800 (PST) [thread overview]
Message-ID: <m3myqbhg4o.fsf@localhost.localdomain> (raw)
In-Reply-To: <1202445714-28971-2-git-send-email-ribas@c3sl.ufpr.br>
Bruno Ribas <ribas@c3sl.ufpr.br> writes:
> 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.
> 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");
> }
>
First, I think the empty lines added are not needed.
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
next prev parent reply other threads:[~2008-02-08 10:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
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 4:41 ` [PATCH] gitweb: Update gitweb/README to include the new per-repository gitweb.owner Bruno Ribas
2008-02-08 10:55 ` Jakub Narebski [this message]
2008-02-08 13:53 ` [PATCH] gitweb: Use the config file to set repository owner's name 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
2008-02-08 7:38 ` Adding gitweb.owner, last shot Junio C Hamano
2008-02-08 13:49 ` Bruno Cesar Ribas
2008-02-08 10:34 ` Jakub Narebski
2008-02-08 13:51 ` Bruno Cesar Ribas
-- strict thread matches above, loose matches on Subject: below --
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-13 0:52 ` Bruno Cesar Ribas
2008-02-13 1:05 ` Junio C Hamano
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=m3myqbhg4o.fsf@localhost.localdomain \
--to=jnareb@gmail.com \
--cc=git@git.c3sl.ufpr.br \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=ribas@c3sl.ufpr.br \
/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).