git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Aneesh Kumar" <aneesh.kumar@gmail.com>
To: "Jakub Narebski" <jnareb@gmail.com>
Cc: "Git Mailing List" <git@vger.kernel.org>
Subject: Re: git_get_projects_list and $projects_list
Date: Thu, 2 Nov 2006 09:43:37 +0530	[thread overview]
Message-ID: <cc723f590611012013v1359efb9qdb5888fc458da22@mail.gmail.com> (raw)
In-Reply-To: <ei7f7o$bgi$1@sea.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 131 bytes --]

On 10/31/06, Jakub Narebski <jnareb@gmail.com> wrote:

>         $dir =~ s!/+$!!;
>

That works. Attaching the diff below

-aneesh

[-- Attachment #2: gitweb.diff --]
[-- Type: text/x-patch, Size: 367 bytes --]

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index bf5f829..4343450 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -897,6 +897,8 @@ sub git_get_projects_list {
 	if (-d $projects_list) {
 		# search in directory
 		my $dir = $projects_list;
+		# remove the trailing "/"
+		$dir =~ s!/+$!!;
 		my $pfxlen = length("$dir");
 
 		File::Find::find({

      reply	other threads:[~2006-11-02  4:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-31 11:47 git_get_projects_list and $projects_list Aneesh Kumar
2006-10-31 11:59 ` Jakub Narebski
2006-10-31 12:23   ` Jakub Narebski
2006-11-02  4:13     ` Aneesh Kumar [this message]

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=cc723f590611012013v1359efb9qdb5888fc458da22@mail.gmail.com \
    --to=aneesh.kumar@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.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).