[PATCH 3/3] git-instaweb: Add support for --reuse-config using gitconfig

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Support instaweb's --reuse-config using instaweb.overwrite
variable in gitconfig.

To use --reuse-config always
	[instaweb]
		overwrite = false

Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@xxxxxxxxx>
---

This patch is based on branch 'pu' and my previous patch
http://thread.gmane.org/gmane.comp.version-control.git/148161

 Documentation/git-instaweb.txt |    2 ++
 git-instaweb.sh                |    5 ++++-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/Documentation/git-instaweb.txt b/Documentation/git-instaweb.txt
index 0e7e20b..12cbe1d 100644
--- a/Documentation/git-instaweb.txt
+++ b/Documentation/git-instaweb.txt
@@ -77,6 +77,8 @@ You may specify configuration in your .git/config
 	port = 4321
 	browser = konqueror
 	modulepath = /usr/lib/apache2/modules
+	gitwebdir = /usr/share/gitweb
+	overwrite = false
 
 -----------------------------------------------------------------------
 
diff --git a/git-instaweb.sh b/git-instaweb.sh
index 1c704a3..3635974 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -28,7 +28,7 @@ httpd="$(git config --get instaweb.httpd)"
 root="$(git config --get instaweb.gitwebdir)"
 port=$(git config --get instaweb.port)
 module_path="$(git config --get instaweb.modulepath)"
-no_reuse=true
+no_reuse="$(git config --bool --get instaweb.overwrite)"
 
 conf="$GIT_DIR/gitweb/httpd.conf"
 
@@ -43,6 +43,9 @@ test -z "$root" && root='@@GITWEBDIR@@'
 # any untaken local port will do...
 test -z "$port" && port=1234
 
+# Default is true -> overwrite gitweb_config.perl
+test -z "$no_reuse" && no_reuse=true
+
 resolve_full_httpd () {
 	case "$httpd" in
 	*apache2*|*lighttpd*)
-- 
1.7.1.447.gfddfb

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]