{"thread":{"id":"11960","subject":"Adding gitweb.owner, last shot","startedAt":"2008-02-08T04:41:52Z","lastAt":"2008-02-08T16:07:57Z","messageCount":12,"participants":["Bruno Ribas","Junio C Hamano","Jakub Narebski","Bruno Cesar Ribas"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"67892","messageId":"1202445714-28971-1-git-send-email-ribas@c3sl.ufpr.br","threadId":"11960","inReplyTo":null,"subject":"Adding gitweb.owner, last shot","fromName":"Bruno Ribas","fromEmail":"ribas@c3sl.ufpr.br","sentAt":"2008-02-08T04:41:52Z","receivedAt":"2008-02-08T04:41:52Z","isPatch":false,"sender":{"key":"ribas@c3sl.ufpr.br","avatar":null},"body":"\nAfter some study about the insertion of a new repository configuration,\nwhich sets repository owner, it was decided by the group that creating\nanother small file inside .git/ is not a good idea. So I started to bench\nthe viability to add just the gitweb.owner configuration, using gitweb.owner\ntogether with gitweb.description there is no major performance downgrade\ncompared to $projects_list , as seen below:\n\n8<-------\nThese times i got with a 1000projects running 2 dd to generate disk IO.\nHere comes the resultm\nNO projects_list  projects_list\n16m30s69          15m10s74       default gitweb, using FS's owner\n16m07s40          15m24s34       patched to get gitweb.owner\n16m37s76          15m59s32       same above, but without gitweb.owner\n\nNow results for a 1000projects on an idle machine.\nNO projects_list  projects_list\n1m19s08           1m09s55       default gitweb, using FS's owner\n1m17s58           1m09s55       patched to get gitweb.owner\n1m18s49           1m08s96       same above, but without gitweb.owner\n8<-------\n\nThe idea of creating only the gitweb.owner can be a case of study to\ncentralize all gitweb repository configuration in one file. Maybe even\nchange the way $projects_list is formated, as gitweb.cgi needs to check\nrepository configuration to get repository description to generate\nprojecT_list page, we could just list repository's directories.\n"},{"id":"67893","messageId":"1202445714-28971-2-git-send-email-ribas@c3sl.ufpr.br","threadId":"11960","inReplyTo":"1202445714-28971-1-git-send-email-ribas@c3sl.ufpr.br","subject":"[PATCH] gitweb: Use the config file to set repository owner's name.","fromName":"Bruno Ribas","fromEmail":"ribas@c3sl.ufpr.br","sentAt":"2008-02-08T04:41:53Z","receivedAt":"2008-02-08T04:41:53Z","isPatch":true,"sender":{"key":"ribas@c3sl.ufpr.br","avatar":null},"body":"From: Git Managment for C3SL <git@git.c3sl.ufpr.br>\n\nNow gitweb checks if gitweb.owner exists before trying to get filesystem's\nowner.\n\nAllow to use configuration variable gitweb.owner set the repository owner,\nit checks the gitweb.owner, if not set it uses filesystem directory's owner.\n\nUseful when we don't want to maintain project list file, and all\nrepository directories have to have the same owner (for example when the\nsame SSH account is shared for all projects, using ssh_acl to control\naccess instead).\n\nSigned-off-by: Git Managment for C3SL <git@git.c3sl.ufpr.br>\n---\n gitweb/gitweb.perl |    7 ++++++-\n 1 files changed, 6 insertions(+), 1 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 8ef2735..e8a43b7 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -1767,7 +1767,12 @@ sub git_get_project_owner {\n \tif (exists $gitweb_project_owner->{$project}) {\n \t\t$owner = $gitweb_project_owner->{$project};\n \t}\n-\tif (!defined $owner) {\n+\n+\tif (!defined $owner){\n+\t\t$owner = git_get_project_config('owner');\n+\t}\n+\n+\tif (!$owner) {\n \t\t$owner = get_file_owner(\"$projectroot/$project\");\n \t}\n \n-- \n1.5.4.34.g053d9-dirty\n"},{"id":"67894","messageId":"1202445714-28971-3-git-send-email-ribas@c3sl.ufpr.br","threadId":"11960","inReplyTo":"1202445714-28971-2-git-send-email-ribas@c3sl.ufpr.br","subject":"[PATCH] gitweb: Update gitweb/README to include the new per-repository gitweb.owner","fromName":"Bruno Ribas","fromEmail":"ribas@c3sl.ufpr.br","sentAt":"2008-02-08T04:41:54Z","receivedAt":"2008-02-08T04:41:54Z","isPatch":true,"sender":{"key":"ribas@c3sl.ufpr.br","avatar":null},"body":"From: Git Managment for C3SL <git@git.c3sl.ufpr.br>\n\n\nSigned-off-by: Git Managment for C3SL <git@git.c3sl.ufpr.br>\n---\n gitweb/README |    4 ++++\n 1 files changed, 4 insertions(+), 0 deletions(-)\n\ndiff --git a/gitweb/README b/gitweb/README\nindex 4c8bedf..2163071 100644\n--- a/gitweb/README\n+++ b/gitweb/README\n@@ -233,6 +233,10 @@ You can use the following files in repository:\n    Displayed in the project summary page. You can use multiple-valued\n    gitweb.url repository configuration variable for that, but the file\n    takes precendence.\n+ * gitweb.owner\n+   You can use the gitweb.owner repository configuration variable to set\n+   repository's owner. It is displayed in the project list and summary\n+   page. If it's not set, filesystem directory's owner is used.\n  * various gitweb.* config variables (in config)\n    Read description of %feature hash for detailed list, and some\n    descriptions.\n-- \n1.5.4.34.g053d9-dirty\n"},{"id":"67907","messageId":"7v3as3lwxn.fsf@gitster.siamese.dyndns.org","threadId":"11960","inReplyTo":"1202445714-28971-1-git-send-email-ribas@c3sl.ufpr.br","subject":"Re: Adding gitweb.owner, last shot","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-08T07:38:44Z","receivedAt":"2008-02-08T07:38:44Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Bruno Ribas <ribas@c3sl.ufpr.br> writes:\n\n> ... there is no major performance downgrade\n> compared to $projects_list , as seen below:\n>\n> 8<-------\n> These times i got with a 1000projects running 2 dd to generate disk IO.\n> Here comes the resultm\n> NO projects_list  projects_list\n> 16m30s69          15m10s74       default gitweb, using FS's owner\n> 16m07s40          15m24s34       patched to get gitweb.owner\n> 16m37s76          15m59s32       same above, but without gitweb.owner\n>\n> Now results for a 1000projects on an idle machine.\n> NO projects_list  projects_list\n> 1m19s08           1m09s55       default gitweb, using FS's owner\n> 1m17s58           1m09s55       patched to get gitweb.owner\n> 1m18s49           1m08s96       same above, but without gitweb.owner\n> 8<-------\n\nLarge installations would maintain the project_list in the flat\nfile format for performance reasons anyway.  Benchmarking under\na condition that yields unreasonably long response time is\nsomewhat meaningless, I am afraid.  Who sane would wait for 15\nminutes for project list to come up?\n\nSo I think your patch makes sense.  It would not help nor hurt\nlarge installations, and would help smaller installations that\ndo not care much about performance but are more interested in\nthe convenience of not having to worry about maintaining the\nproject_list.\n\nAs the act of signing off patches is a legal statement, I'd\nprefer real person's name, not \"Git Managment for C3SL\", in the\nmessages to be applied.  The change that adds the feature, and\nthe documentation update to describe that new feature, should be\nin the same single patch for a small change like this.\n"},{"id":"67927","messageId":"m3abmb4tyx.fsf@localhost.localdomain","threadId":"11960","inReplyTo":"1202445714-28971-1-git-send-email-ribas@c3sl.ufpr.br","subject":"Re: Adding gitweb.owner, last shot","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-02-08T10:34:55Z","receivedAt":"2008-02-08T10:34:55Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Bruno Ribas <ribas@c3sl.ufpr.br> writes:\n\n> After some study about the insertion of a new repository configuration,\n> which sets repository owner, it was decided by the group that creating\n> another small file inside .git/ is not a good idea. So I started to bench\n> the viability to add just the gitweb.owner configuration, using gitweb.owner\n> together with gitweb.description there is no major performance downgrade\n> compared to $projects_list , as seen below:\n> \n> 8<-------\n> These times i got with a 1000projects running 2 dd to generate disk IO.\n> Here comes the resultm\n> NO projects_list  projects_list\n> 16m30s69          15m10s74       default gitweb, using FS's owner\n> 16m07s40          15m24s34       patched to get gitweb.owner\n> 16m37s76          15m59s32       same above, but without gitweb.owner\n> \n> Now results for a 1000projects on an idle machine.\n> NO projects_list  projects_list\n> 1m19s08           1m09s55       default gitweb, using FS's owner\n> 1m17s58           1m09s55       patched to get gitweb.owner\n> 1m18s49           1m08s96       same above, but without gitweb.owner\n> 8<-------\n\nIt looks like there is almost no difference between using only FS\nowner, and reading also repository config using \"git config -z -l\"...\nCould anyone using gitweb on MS Windows or MacOS X, where fork is mich\nslower, check those figures?\n\nPasky, could you please try to benchmark this (well, at least without\ngitweb.owner set) on a _real_ large set of repositories?\n \n> The idea of creating only the gitweb.owner can be a case of study to\n> centralize all gitweb repository configuration in one file. Maybe even\n> change the way $projects_list is formated, as gitweb.cgi needs to check\n> repository configuration to get repository description to generate\n> project_list page, we could just list repository's directories.\n\nI was thinking about git-config-like format (but simplified to make it\neasy to parse it in Perl, just like git-cvsserver configuration), in\nthe form of\n\n[gitweb \"<repository path, relative to $projectroot>\"]\n        description = <project description>\n        url = <first URL>\n        url = <seconf URL>\n        owner = <repository owner>\n\nThe problem with parsing lies (among others) in the in-line comments,\nnovalue keys, and key after section, I think...\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"67929","messageId":"m3myqbhg4o.fsf@localhost.localdomain","threadId":"11960","inReplyTo":"1202445714-28971-2-git-send-email-ribas@c3sl.ufpr.br","subject":"Re: [PATCH] gitweb: Use the config file to set repository owner's name.","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-02-08T10:55:33Z","receivedAt":"2008-02-08T10:55:33Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Bruno Ribas <ribas@c3sl.ufpr.br> writes:\n\n> Allow to use configuration variable gitweb.owner set the repository owner,\n> it checks the gitweb.owner, if not set it uses filesystem directory's owner.\n\n> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\n> index 8ef2735..e8a43b7 100755\n> --- a/gitweb/gitweb.perl\n> +++ b/gitweb/gitweb.perl\n> @@ -1767,7 +1767,12 @@ sub git_get_project_owner {\n>  \tif (exists $gitweb_project_owner->{$project}) {\n>  \t\t$owner = $gitweb_project_owner->{$project};\n>  \t}\n> -\tif (!defined $owner) {\n> +\n> +\tif (!defined $owner){\n> +\t\t$owner = git_get_project_config('owner');\n> +\t}\n> +\n> +\tif (!$owner) {\n>  \t\t$owner = get_file_owner(\"$projectroot/$project\");\n>  \t}\n>  \n\nFirst, I think the empty lines added are not needed.\n\nSecond, git_get_project_config() subroutine _REQUIRES_ for $git_dir to\nbe set. So you have to set $git_dir before checking repo config; then\nyou can reuse $git_dir in checking file owner.\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"67945","messageId":"20080208134921.GA30264@c3sl.ufpr.br","threadId":"11960","inReplyTo":"7v3as3lwxn.fsf@gitster.siamese.dyndns.org","subject":"Re: Adding gitweb.owner, last shot","fromName":"Bruno Cesar Ribas","fromEmail":"ribas@c3sl.ufpr.br","sentAt":"2008-02-08T13:49:21Z","receivedAt":"2008-02-08T13:49:21Z","isPatch":false,"sender":{"key":"ribas@c3sl.ufpr.br","avatar":null},"body":"On Thu, Feb 07, 2008 at 11:38:44PM -0800, Junio C Hamano wrote:\n> Bruno Ribas <ribas@c3sl.ufpr.br> writes:\n> \n> > ... there is no major performance downgrade\n> > compared to $projects_list , as seen below:\n> >\n> > 8<-------\n> > These times i got with a 1000projects running 2 dd to generate disk IO.\n> > Here comes the resultm\n> > NO projects_list  projects_list\n> > 16m30s69          15m10s74       default gitweb, using FS's owner\n> > 16m07s40          15m24s34       patched to get gitweb.owner\n> > 16m37s76          15m59s32       same above, but without gitweb.owner\n> >\n> > Now results for a 1000projects on an idle machine.\n> > NO projects_list  projects_list\n> > 1m19s08           1m09s55       default gitweb, using FS's owner\n> > 1m17s58           1m09s55       patched to get gitweb.owner\n> > 1m18s49           1m08s96       same above, but without gitweb.owner\n> > 8<-------\n> \n> Large installations would maintain the project_list in the flat\n> file format for performance reasons anyway.  Benchmarking under\n> a condition that yields unreasonably long response time is\n> somewhat meaningless, I am afraid.  Who sane would wait for 15\n> minutes for project list to come up?\n\nBut it got 15minutes with project_list to! The real problem is geting last\nchange on repository under high IO.\n> \n><snip>\n> \n> As the act of signing off patches is a legal statement, I'd\n> prefer real person's name, not \"Git Managment for C3SL\", in the\n> messages to be applied.  The change that adds the feature, and\n> the documentation update to describe that new feature, should be\n> in the same single patch for a small change like this.\n\nI'll resend it !! my mistake of names =(\n> \n> \n> \n> \n> -\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n\n-- \nBruno Ribas - ribas@c3sl.ufpr.br\nhttp://web.inf.ufpr.br/ribas\nC3SL: http://www.c3sl.ufpr.br \n"},{"id":"67946","messageId":"20080208135150.GB30264@c3sl.ufpr.br","threadId":"11960","inReplyTo":"m3abmb4tyx.fsf@localhost.localdomain","subject":"Re: Adding gitweb.owner, last shot","fromName":"Bruno Cesar Ribas","fromEmail":"ribas@c3sl.ufpr.br","sentAt":"2008-02-08T13:51:50Z","receivedAt":"2008-02-08T13:51:50Z","isPatch":false,"sender":{"key":"ribas@c3sl.ufpr.br","avatar":null},"body":"On Fri, Feb 08, 2008 at 02:34:55AM -0800, Jakub Narebski wrote:\n> Bruno Ribas <ribas@c3sl.ufpr.br> writes:\n> \n><snip> \n> Pasky, could you please try to benchmark this (well, at least without\n> gitweb.owner set) on a _real_ large set of repositories?\n\nAnd I'd like to know what this machine runs! If it is git dedicated, or\nshares with something else.\n\nIf it is git dedicated, it makes time better as disk IO will not be severe.\n\n>  \n> > The idea of creating only the gitweb.owner can be a case of study to\n> > centralize all gitweb repository configuration in one file. Maybe even\n> > change the way $projects_list is formated, as gitweb.cgi needs to check\n> > repository configuration to get repository description to generate\n> > project_list page, we could just list repository's directories.\n> \n> I was thinking about git-config-like format (but simplified to make it\n> easy to parse it in Perl, just like git-cvsserver configuration), in\n> the form of\n> \n> [gitweb \"<repository path, relative to $projectroot>\"]\n>         description = <project description>\n>         url = <first URL>\n>         url = <seconf URL>\n>         owner = <repository owner>\n> \n> The problem with parsing lies (among others) in the in-line comments,\n> novalue keys, and key after section, I think...\n> \n> -- \n> Jakub Narebski\n> Poland\n> ShadeHawk on #git\n\n-- \nBruno Ribas - ribas@c3sl.ufpr.br\nhttp://web.inf.ufpr.br/ribas\nC3SL: http://www.c3sl.ufpr.br \n"},{"id":"67947","messageId":"20080208135327.GC30264@c3sl.ufpr.br","threadId":"11960","inReplyTo":"m3myqbhg4o.fsf@localhost.localdomain","subject":"Re: [PATCH] gitweb: Use the config file to set repository owner's name.","fromName":"Bruno Cesar Ribas","fromEmail":"ribas@c3sl.ufpr.br","sentAt":"2008-02-08T13:53:27Z","receivedAt":"2008-02-08T13:53:27Z","isPatch":true,"sender":{"key":"ribas@c3sl.ufpr.br","avatar":null},"body":"On Fri, Feb 08, 2008 at 02:55:33AM -0800, Jakub Narebski wrote:\n> Bruno Ribas <ribas@c3sl.ufpr.br> writes:\n> \n><snip> \n> First, I think the empty lines added are not needed.\n\nI made those empty lines because original code had same empty lines above, I\njust let it to have same pattern, but I can remove. Should I remove?! I'll\nresend without it, and with $git_dir set.\n> \n> Second, git_get_project_config() subroutine _REQUIRES_ for $git_dir to\n> be set. So you have to set $git_dir before checking repo config; then\n> you can reuse $git_dir in checking file owner.\n> \n> -- \n> Jakub Narebski\n> Poland\n> ShadeHawk on #git\n\n-- \nBruno Ribas - ribas@c3sl.ufpr.br\nhttp://web.inf.ufpr.br/ribas\nC3SL: http://www.c3sl.ufpr.br \n"},{"id":"67954","messageId":"20080208143027.GA707@c3sl.ufpr.br","threadId":"11960","inReplyTo":"20080208135327.GC30264@c3sl.ufpr.br","subject":"Re: [PATCH] gitweb: Use the config file to set repository owner's name.","fromName":"Bruno Cesar Ribas","fromEmail":"ribas@c3sl.ufpr.br","sentAt":"2008-02-08T14:30:27Z","receivedAt":"2008-02-08T14:30:27Z","isPatch":true,"sender":{"key":"ribas@c3sl.ufpr.br","avatar":null},"body":"On Fri, Feb 08, 2008 at 11:53:27AM -0200, Bruno Cesar Ribas wrote:\n> On Fri, Feb 08, 2008 at 02:55:33AM -0800, Jakub Narebski wrote:\n> > Bruno Ribas <ribas@c3sl.ufpr.br> writes:\n> > \n> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\n> index 8ef2735..e8a43b7 100755\n> --- a/gitweb/gitweb.perl\n> +++ b/gitweb/gitweb.perl\n> @@ -1767,7 +1767,12 @@ sub git_get_project_owner {\n>       if (exists $gitweb_project_owner->{$project}) {\n>               $owner = $gitweb_project_owner->{$project};\n>       }\n> -     if (!defined $owner) {\n> +\n> +     if (!defined $owner){\n> +             $owner = git_get_project_config('owner');\n> +     }\n> +\n> +     if (!$owner) {\n>               $owner = get_file_owner(\"$projectroot/$project\");\n>       }\n>\n\n\nI that last 3lines should be inside the block that we call\ngit_get_project_config, don't you think?\n\n> > First, I think the empty lines added are not needed.\n> \n> I made those empty lines because original code had same empty lines above, I\n> just let it to have same pattern, but I can remove. Should I remove?! I'll\n> resend without it, and with $git_dir set.\n> > \n> > Second, git_get_project_config() subroutine _REQUIRES_ for $git_dir to\n> > be set. So you have to set $git_dir before checking repo config; then\n> > you can reuse $git_dir in checking file owner.\n> > \n> > -- \n> > Jakub Narebski\n> > Poland\n> > ShadeHawk on #git\n> \n> -- \n> Bruno Ribas - ribas@c3sl.ufpr.br\n> http://web.inf.ufpr.br/ribas\n> C3SL: http://www.c3sl.ufpr.br \n> -\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n\n-- \nBruno Ribas - ribas@c3sl.ufpr.br\nhttp://web.inf.ufpr.br/ribas\nC3SL: http://www.c3sl.ufpr.br \n"},{"id":"67956","messageId":"200802081633.55934.jnareb@gmail.com","threadId":"11960","inReplyTo":"20080208143027.GA707@c3sl.ufpr.br","subject":"Re: [PATCH] gitweb: Use the config file to set repository owner's name.","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-02-08T15:33:54Z","receivedAt":"2008-02-08T15:33:54Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"I have joined the two emails to reply only once.\n\nOn Fri, 8 Feb 2008, Bruno Cesar Ribas wrote:\n> On Fri, Feb 08, 2008 at 02:55:33AM -0800, Jakub Narebski wrote:\n>> Bruno Ribas <ribas@c3sl.ufpr.br> writes:\n>>> \n>>> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\n>>> index 8ef2735..e8a43b7 100755\n>>> --- a/gitweb/gitweb.perl\n>>> +++ b/gitweb/gitweb.perl\n>>> @@ -1767,7 +1767,12 @@ sub git_get_project_owner {\n>>>       if (exists $gitweb_project_owner->{$project}) {\n>>>               $owner = $gitweb_project_owner->{$project};\n>>>       }\n>>> -     if (!defined $owner) {\n>>> +\n>>> +     if (!defined $owner){\n>>> +             $owner = git_get_project_config('owner');\n>>> +     }\n>>> +\n>>> +     if (!$owner) {\n>>>               $owner = get_file_owner(\"$projectroot/$project\");\n>>>       }\n\nAnother comment: why did you change from checking of \"!defined $owner\"\nto checking \"!$owner\"? git_get_project_config('owner') returns undef\nif gitweb.owner is not defined. With checking for defined we can avoid\nfalse positives of owner being \"0\" (in practice I think this does not\nmatter) or \"\" (this could happen if somebody doesn't want for project\nto have owner shown).\n\n>> First, I think the empty lines added are not needed.\n> \n> I made those empty lines because original code had same empty lines\n> above, I just let it to have same pattern, but I can remove. Should I\n> remove?!\n\nThe idea was for empty lines to separate blocks of code: variables \ndeclaration, initialization, finding an owner, and return value.\nSo I think that empty lines are not needed here. There were no empty \nlines between check for owner in the structure populated by \ngit_get_project_list_from_file() and checking filesystem stat for \nproject directory owner.\n\nBy the way, the git_get_project_list_from_file() interface is a bit \nstrange...\n\n> I that last 3lines should be inside the block that we call\n> git_get_project_config, don't you think?\n\nNo. I think using \"if (!defined $foo) { maybe define foo }...\"\nsequence is a good flow.\n\n> I'll resend [...] with $git_dir set.\n\nAnd with signoff corrected, I assume?\n\nPlease try to check if the code works with and without gitweb.owner set \nbefore sending new version of the patch...\n-- \nJakub Narebski\nPoland\n"},{"id":"67959","messageId":"20080208160757.GA11965@c3sl.ufpr.br","threadId":"11960","inReplyTo":"200802081633.55934.jnareb@gmail.com","subject":"Re: [PATCH] gitweb: Use the config file to set repository owner's name.","fromName":"Bruno Cesar Ribas","fromEmail":"ribas@c3sl.ufpr.br","sentAt":"2008-02-08T16:07:57Z","receivedAt":"2008-02-08T16:07:57Z","isPatch":true,"sender":{"key":"ribas@c3sl.ufpr.br","avatar":null},"body":"On Fri, Feb 08, 2008 at 04:33:54PM +0100, Jakub Narebski wrote:\n> I have joined the two emails to reply only once.\n> \n> On Fri, 8 Feb 2008, Bruno Cesar Ribas wrote:\n> > On Fri, Feb 08, 2008 at 02:55:33AM -0800, Jakub Narebski wrote:\n> >> Bruno Ribas <ribas@c3sl.ufpr.br> writes:\n> >>> \n> >>> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\n> >>> index 8ef2735..e8a43b7 100755\n> >>> --- a/gitweb/gitweb.perl\n> >>> +++ b/gitweb/gitweb.perl\n> >>> @@ -1767,7 +1767,12 @@ sub git_get_project_owner {\n> >>>       if (exists $gitweb_project_owner->{$project}) {\n> >>>               $owner = $gitweb_project_owner->{$project};\n> >>>       }\n> >>> -     if (!defined $owner) {\n> >>> +\n> >>> +     if (!defined $owner){\n> >>> +             $owner = git_get_project_config('owner');\n> >>> +     }\n> >>> +\n> >>> +     if (!$owner) {\n> >>>               $owner = get_file_owner(\"$projectroot/$project\");\n> >>>       }\n> \n> Another comment: why did you change from checking of \"!defined $owner\"\n> to checking \"!$owner\"? git_get_project_config('owner') returns undef\n> if gitweb.owner is not defined. With checking for defined we can avoid\n> false positives of owner being \"0\" (in practice I think this does not\n> matter) or \"\" (this could happen if somebody doesn't want for project\n> to have owner shown).\n\nWhen I tested it returned empty, but i found out it was lack of NAME for the\nuser i was running tests.\n\n> \n> \n> > I'll resend [...] with $git_dir set.\n> \n> And with signoff corrected, I assume?\n\nof course.\n> \n> Please try to check if the code works with and without gitweb.owner set \n> before sending new version of the patch...\n\nI always do that.\n> -- \n> Jakub Narebski\n> Poland\n\n-- \nBruno Ribas - ribas@c3sl.ufpr.br\nhttp://web.inf.ufpr.br/ribas\nC3SL: http://www.c3sl.ufpr.br \n"}]}