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

[PATCH] gitweb: Document that gitweb deals with bare repositories

From
Jakub Narebski <jnareb@gmail.com>
Date
May 15, 2009, 21:17 UTC
Message-ID
<20090515211611.27697.82605.stgit@localhost.localdomain>
In-Reply-To
<ed82fe3e0905151349k15f040aej30dbec82037e9d76@mail.gmail.com>

Add reminders to gitweb/README and gitweb/INSTALL that gitweb works with bare repositories. While it might be obvious to us, it is not apparently as evident for newcomers.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
Timur Tabi wrote:
Show 35 quoted lines
> I noticed that most gitweb pages show their repositories like this:
> 
> bluetooth/bluez-gnome.git 	Bluetooth applications for ... 	Marcel Holtmann
> bluetooth/bluez-hcidump.git 	Bluetooth packet analyzer 	Marcel Holtmann
> bluetooth/bluez.git		Bluetooth protocol stack for... Marcel Holtmann
> 
> However, mine looks like this:
> 
> alsa.1862/.git  8610 audio: fabric driver uses wrong DMA channels for... 	Timur
> alsa.2598/.git  8610 audio: migrate ASoC V2 drivers to mainline	Timur
> alsa.3313/.git  Introduce spin_event_timeout()	Timur
> 
> Notice how my repositories have a trailing "/.git" to them?  How do I
> get rid of that?
> 
> My gitweb.conf is:
> 
> $projectroot = '/home/b04825/git/';
> $site_name = "Timur Tabi's git repositories";
> $home_link = $my_uri;
> @stylesheets = ("gitweb.css");
> $favicon = "git-favicon.png";
> $logo = "git-logo.png";
> $projects_list = '/home/b04825/git/projects_list';
> $projects_list_description_width = 50;
> 
> And /home/b04825/git/projects_list looks like:
> 
> alsa.1862/.git Timur
> alsa.2598/.git Timur
> alsa.3313/.git Timur
> 
> I presume the reason why gitweb shows the trailing "/.git" is because
> that's what my projects_list file contains.  However, if I remove the
> "/.git" from projects_list, gitweb can't find any repositories.
Does this explanation help?
 gitweb/INSTALL |   14 ++++++++++++++
 gitweb/README  |   12 +++++++-----
 2 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/gitweb/INSTALL b/gitweb/INSTALL
index 18c9ce3..f43e233 100644
--- a/gitweb/INSTALL
+++ b/gitweb/INSTALL
@@ -127,6 +127,20 @@ GITWEB_CONFIG file:
 Gitweb repositories
 -------------------
 
+- Gitweb deals with bare repositories, which means that gitweb scans for
+  (in the case where $projects_list is a directory to search for
+  repositories) or has to be provided with list of (in the case where
+  $projects_list is a text file) bare repositories, i.e. $GIT_DIR for
+  each repository. The consequence of that is the fact that if you use
+  gitweb to view non-bare repository named 'repo' then gitweb would show
+  (or would have to be provided with) 'repo/.git'.
+
+  If you want to view a buch of non-bare repositories in gitweb but want
+  them named 'repo.git' as is the standard for bare repositories, you
+  can as a workaround populare $projectroot / $project_list with
+  symbolic links to $GIT_DIR of each project you want to publish (have
+  shown) in gitweb.
+
 - By default all git repositories under projectroot are visible and
   available to gitweb. The list of projects is generated by default by
   scanning the projectroot directory for git repositories (for object
diff --git a/gitweb/README b/gitweb/README
index ccda890..a61fa2f 100644
--- a/gitweb/README
+++ b/gitweb/README
@@ -34,10 +34,11 @@ You can specify the following configuration variables when building GIT:
  * GITWEB_LIST
    Points to a directory to scan for projects (defaults to project root
    if not set / if empty) or to a file with explicit listing of projects
-   (together with projects' ownership). See "Generating projects list
-   using gitweb" in INSTALL file for gitweb to find out how to generate
-   such file from scan of a directory. [No default, which means use root
-   directory for projects]
+   (together with projects' ownership). Note that gitweb deals with bare
+   repositories; it shows/uses $GIT_DIR for each repository. See also
+   "Generating projects list using gitweb" in INSTALL file for gitweb to
+   find out how to generate such file from scan of a directory. 
+   [No default, which means use root directory for projects]
  * GITWEB_EXPORT_OK
    Show repository only if this file exists (in repository).  Only
    effective if this variable evaluates to true.  [No default / Not set]
@@ -153,7 +154,8 @@ not include variables usually directly set during build):
    Absolute filesystem path which will be prepended to project path;
    the path to repository is $projectroot/$project.  Set to
    $GITWEB_PROJECTROOT during installation.  This variable have to be
-   set correctly for gitweb to find repositories.
+   set correctly for gitweb to find repositories.  (Note that gitweb deals
+   with bare repositories.)
  * $projects_list
    Source of projects list, either directory to scan, or text file
    with list of repositories (in the "<URI-encoded repository path> SP
Previous: J.H.Next: Timur Tabi
Message 3 of 8 in “Removing the trailing "/.git" from gitweb display?”
  1. Timur TabiMay 15, 2009
  2. J.H.May 15, 2009
  3. gitweb: Document that gitweb deals with bare repositoriesJakub Narebski, May 15, 2009
  4. Timur TabiMay 15, 2009
  5. Jakub NarebskiMay 15, 2009
  6. Timur TabiMay 15, 2009
  7. Junio C HamanoMay 16, 2009
  8. Jakub NarebskiMay 16, 2009

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.