git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
To: git@vger.kernel.org, jnareb@gmail.com, chriscool@tuxfamily.org,
	pasky@ucw.cz
Cc: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
Subject: [PATCH 3/3] git-instaweb: Add support for --reuse-config using gitconfig
Date: Thu,  3 Jun 2010 19:25:56 +0530	[thread overview]
Message-ID: <1275573356-21466-3-git-send-email-pavan.sss1991@gmail.com> (raw)
In-Reply-To: <1275573356-21466-1-git-send-email-pavan.sss1991@gmail.com>

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@gmail.com>
---

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

  parent reply	other threads:[~2010-06-03 13:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-03 13:55 [PATCH GSoC 1/3] gitweb: Create Gitweb::Config module Pavan Kumar Sunkara
2010-06-03 13:55 ` [PATCH GSoC 2/3] gitweb: Create Gitweb::Request module Pavan Kumar Sunkara
2010-06-03 13:55 ` Pavan Kumar Sunkara [this message]
2010-06-03 15:20 ` [PATCH GSoC 1/3] gitweb: Create Gitweb::Config module Petr Baudis
2010-06-03 15:54   ` Ævar Arnfjörð Bjarmason
2010-06-03 16:59     ` Jakub Narebski
2010-06-03 17:04       ` Ævar Arnfjörð Bjarmason
2010-06-03 15:55   ` Jakub Narebski
2010-06-03 16:06     ` Petr Baudis
2010-06-03 16:11     ` Pavan Kumar Sunkara
2010-06-03 18:43       ` Jakub Narebski
2010-06-03 18:50         ` Pavan Kumar Sunkara
2010-06-03 16:00 ` Ævar Arnfjörð Bjarmason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1275573356-21466-3-git-send-email-pavan.sss1991@gmail.com \
    --to=pavan.sss1991@gmail.com \
    --cc=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    --cc=pasky@ucw.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).