File: 0006-instaweb-ignore-GITWEB_CONFIG_SYSTEM.diff

package info (click to toggle)
git 1%3A1.7.2.5-3
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 18,036 kB
  • ctags: 13,298
  • sloc: ansic: 108,217; sh: 74,973; perl: 23,370; tcl: 20,137; python: 3,843; makefile: 2,885; lisp: 1,779; asm: 98
file content (46 lines) | stat: -rw-r--r-- 1,784 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
From 576c20d284a50fd1a66031f40c04966ae81e89c9 Mon Sep 17 00:00:00 2001
From: Jonathan Nieder <jrnieder@gmail.com>
Date: Fri, 3 Sep 2010 19:41:12 -0500
Subject: instaweb: ignore GITWEB_CONFIG_SYSTEM
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The configuration in /etc/gitweb.conf might specify an arbitrary
filesystem layout, but instaweb wants a specific one.  So stop reading
/etc/gitweb.conf.  The caller can request to read settings from
gitweb.conf if they are really wanted by running

	GITWEB_CONFIG=/etc/gitweb.conf git instaweb

After v1.7.2-rc0~55^2~3 (git-instaweb: Configure it to work with new
gitweb structure, 2010-05-28), instaweb will provide its own
gitweb_config.perl, making this patch a no-op.  gitweb does not look
at the fallback /etc/gitweb.conf when supplied with a config file.

Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Eric Wong <normalperson@yhbt.net>
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
 git-instaweb.sh |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/git-instaweb.sh b/git-instaweb.sh
index 0c6e103..faf9868 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -387,7 +387,9 @@ script='
 s#^(my|our) \$projectroot =.*#$1 \$projectroot = "'$(dirname "$fqgitdir")'";#;
 s#(my|our) \$gitbin =.*#$1 \$gitbin = "'$GIT_EXEC_PATH'";#;
 s#(my|our) \$projects_list =.*#$1 \$projects_list = \$projectroot;#;
-s#(my|our) \$git_temp =.*#$1 \$git_temp = "'$fqgitdir/gitweb/tmp'";#;'
+s#(my|our) \$git_temp =.*#$1 \$git_temp = "'$fqgitdir/gitweb/tmp'";#;
+s#(my|our) \$GITWEB_CONFIG_SYSTEM =.*#$1 \$GITWEB_CONFIG_SYSTEM = "";#;
+'
 
 gitweb_cgi () {
 	cat > "$1.tmp" <<\EOFGITWEB
-- 
1.7.2.2