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

gitweb problem?

From
Eli Barzilay <eli@barzilay.org>
Date
Mar 1, 2010, 06:54 UTC
Message-ID
<m34ol0wmze.fsf@winooski.ccs.neu.edu>

Whenever I view the toplevel gitweb page (running as a cgi script under apache), but not when in a specific repo, I get this in my error log:

gitweb.cgi: Use of uninitialized value $git_dir in concatenation (.) or string at /home/git/gitweb/gitweb.cgi line 2065. fatal: error processing config file(s) gitweb.cgi: Use of uninitialized value $git_dir in concatenation (.) or string at /home/git/gitweb/gitweb.cgi line 2221. gitweb.cgi: Use of uninitialized value $git_dir in concatenation (.) or string at /home/git/gitweb/gitweb.cgi line 2218.

(taken verbatim from the apache error log, removed uninteresting line prefixes.)

I'm using the pathinfo option, so perhaps there is a problem with that setup?

Looking at the source, the last two line numbers are in `git_get_project_config' -- so my guess is that the code is trying to get the options from the repository config file even when showing the toplevel page. Based on this, and also guessing that $git_dir is unset when viewing the toplevel page, I added

	return unless (defined $git_dir);

to the top (of the `git_get_project_config' function), and I get no warnings and everything works as it should.

(Disclaimer: I can barely read perl, and I'm a git newbie, so all of this can be due to some other stupid mistake.)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!
Next: Jakub Narebski
Message 1 of 6 in “gitweb problem?”
  1. Eli BarzilayMar 1, 2010
  2. Jakub NarebskiMar 1, 2010
  3. Eli BarzilayMar 1, 2010
  4. Jakub NarebskiMar 1, 2010
  5. gitweb: Fix project-specific feature override behaviorJakub Narebski, Mar 1, 2010
  6. Eli BarzilayMar 2, 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.