git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dennis Stosberg <dennis@stosberg.net>
To: Martin Langhoff <martin.langhoff@gmail.com>
Cc: Jakub Narebski <jnareb@gmail.com>, git@vger.kernel.org
Subject: [PATCH 2/3] Add a parameter to specify the repository path
Date: Wed, 21 Jun 2006 15:08:03 +0200	[thread overview]
Message-ID: <20060621130802.G53392da4@leonov.stosberg.net> (raw)
In-Reply-To: <20060621130535.G2b34d382@leonov.stosberg.net>

---
 builtin-help.c |    2 +-
 git.c          |    6 ++++++
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/builtin-help.c b/builtin-help.c
index 7470faa..db233eb 100644
--- a/builtin-help.c
+++ b/builtin-help.c
@@ -10,7 +10,7 @@ #include "exec_cmd.h"
 #include "common-cmds.h"
 
 static const char git_usage[] =
-	"Usage: git [--version] [--exec-path[=GIT_EXEC_PATH]] [--help] COMMAND [ ARGS ]";
+	"Usage: git [--version] [--exec-path[=GIT_EXEC_PATH]] [--git-dir=GIT_DIR] [--help] COMMAND [ ARGS ]";
 
 /* most gui terms set COLUMNS (although some don't export it) */
 static int term_columns(void)
diff --git a/git.c b/git.c
index 94e9a4a..d49f626 100644
--- a/git.c
+++ b/git.c
@@ -277,6 +277,12 @@ int main(int argc, const char **argv, ch
 			puts(git_exec_path());
 			exit(0);
 		}
+
+		if (!strncmp(cmd, "git-dir=", 8)) {
+			setenv("GIT_DIR", cmd + 8, 1);
+			continue;
+		}
+
 		cmd_usage(0, NULL, NULL);
 	}
 	argv[0] = cmd;
-- 
1.4.0

  parent reply	other threads:[~2006-06-21 13:08 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-20 16:51 [RFC] gitweb wishlist and TODO list Jakub Narebski
2006-06-20 17:33 ` Carl Worth
2006-06-20 17:46   ` Jakub Narebski
2006-06-20 17:55     ` Petr Baudis
2006-06-20 18:34       ` Jakub Narebski
2006-06-20 18:40         ` Petr Baudis
2006-06-21 14:52       ` Jakub Narebski
2006-06-20 19:33 ` Martin Langhoff
2006-06-20 19:56   ` Jakub Narebski
2006-06-20 21:17     ` Martin Langhoff
2006-07-01 10:35       ` Paul Mackerras
2006-06-21 13:05   ` Dennis Stosberg
2006-06-21 13:07     ` [PATCH 1/3] gitweb: Declare global variables with "our" Dennis Stosberg
2006-06-21 13:08     ` Dennis Stosberg [this message]
2006-06-21 13:09     ` [PATCH 3/3] gitweb: Use --git-dir parameter instead of setting $ENV{'GIT_DIR'} Dennis Stosberg
2006-06-21 13:33       ` Timo Hirvonen
2006-06-21 13:42         ` Jakub Narebski
2006-06-21 13:30     ` [RFC] gitweb wishlist and TODO list Jakub Narebski
2006-06-22 10:00       ` Dennis Stosberg
2006-06-22 14:47         ` Ryan Anderson
2006-06-21 16:45     ` Ryan Anderson
2006-06-21 17:36       ` Jakub Narebski
2006-06-20 19:46 ` Junio C Hamano
2006-06-20 20:10 ` Petr Baudis
2006-06-20 20:59   ` Jakub Narebski
2006-06-20 21:25 ` Petr Baudis
2006-06-20 21:53 ` Thomas Glanzmann
2006-06-21  8:56   ` Josef Weidendorfer
2006-06-21  9:15     ` Jakub Narebski
2006-06-21  9:57       ` Josef Weidendorfer
2006-06-21 13:53         ` Jakub Narebski
     [not found]           ` <200606211802.41071.Josef.Weidendorfer@gmx.de>
2006-06-21 16:38             ` Jakub Narebski
2006-06-21 20:35               ` Josef Weidendorfer
2006-06-22  9:01 ` Jakub Narebski
2006-06-22  9:14   ` Junio C Hamano

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=20060621130802.G53392da4@leonov.stosberg.net \
    --to=dennis@stosberg.net \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    --cc=martin.langhoff@gmail.com \
    /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).