git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Gitweb: Scan dir for repos & show these other specified repos

From
Sylvain Rabot <sylvain@abstraction.fr>
Date
Mar 1, 2010, 22:22 UTC
Message-ID
<1267482172.4400.22.camel@kheops>
In-Reply-To
<201003012318.29548.jnareb@gmail.com>
On Mon, 2010-03-01 at 23:18 +0100, Jakub Narebski wrote:
Show 45 quoted lines
> On Mon, 1 Mar 2010, Sylvain Rabot wrote:
> > On Mon, 2010-03-01 at 11:55 -0800, Jakub Narebski wrote:
> > > "Mike.lifeguard" <mike.lifeguard@gmail.com> writes:
> > > 
> > > > Is it possible to have gitweb show all repositories in /path/to/wherever
> > > > and also show some other repositories at particular locations like
> > > > /home/user/git/repo1 and /home/user2/git/repo2 ? Or better yet, scan
> > > > multiple dirs? Currently I can only see how to do one or the other
> > > > within a single gitweb installation. I suppose I could run two of them...
> 
> > > P.S. It probably be a good idea to have something like mod_userdir,
> > > but gitweb currently doesn't support something like that.
> > 
> > I had the same problematic some times ago. I wanted to have several
> > project's roots folder for gitweb (one for each unix user of the
> > server).
> > 
> > You can find the discussion here :
> > 
> > http://thread.gmane.org/gmane.comp.version-control.git/132926/
> > http://marc.info/?t=125827961600002&r=1&w=2
> > 
> > Here the configuration I used :
> > 
> > /etc/gitweb.conf :
> > 
> > $projectroot = $ENV{'GITWEB_PROJECTROOT'} || "/var/gitweb";
> > 
> > /etc/apache2/sites-available/yourvirtualhost :
> > 
> > RewriteEngine on
> > RewriteRule ^/$ /cgi-bin/gitweb.cgi [QSA,L,PT]
> > RewriteRule ^/\~([^\/]+)/?$ /cgi-bin/gitweb.cgi
> > [QSA,E=GITWEB_PROJECTROOT:/home/$1/gitweb/,L,PT]
> > 
> > I.E. :
> > 
> > http://yourvirtualhost/ will have /var/gitweb as proeject root
> > http://yourvirtualhost/~<user>/ will have /home/<users>/gitweb as
> > proeject root
> > 
> > You can modify the rewrite rule to match what you want to do.
> 
> Would you mind writing it up and adding it as an example in gitweb/README?
> If you don't have time, I can try to do this myself in my free time.

Not at all. I will try to make it the more understandable possible and I will send you the patch.

-- 
Sylvain Rabot <sylvain@abstraction.fr>
Previous: Jakub NarebskiNext: Sylvain Rabot
Message 5 of 8 in “Gitweb: Scan dir for repos & show these other specified repos”
  1. Mike.lifeguardMar 1, 2010
  2. Jakub NarebskiMar 1, 2010
  3. Sylvain RabotMar 1, 2010
  4. Jakub NarebskiMar 1, 2010
  5. Sylvain RabotMar 1, 2010
  6. gitweb multiple project roots documentationSylvain Rabot, Mar 2, 2010
  7. Jakub NarebskiMar 2, 2010
  8. gitweb readme fixed regarding per user project root repositorySylvain Rabot, Mar 10, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.