From: Kevin Green <Kevin.T.Green@morganstanley.com>
To: git@vger.kernel.org
Subject: [RFC][PATCH] Fix assumption that git is installed in a standard place on the remote end ssh
Date: Fri, 15 Jun 2007 11:03:51 -0400 [thread overview]
Message-ID: <20070615150351.GH14677@menevado.ms.com> (raw)
Hi,
I've run into a problem pushing/pulling where we don't (READ: can't) have git installed in the
standard location. This leads to a failure on trying to find the git binaries
on the remote end. I've looked through the archives and didn't come across
any similar discussions. Please point me there if I've missed something...
I wanted to introduce a commandline arg, similar to what rsync does, call it
--git-path=PATH, where a user can specify the location of git on the remote
end.
After tracking through what really is happening with a git pull, I realized
that a change like that is pretty intrusive and is not just a simple addition
to the ssh handling code, i.e. we'll need to push that arg through all the sh
scripts, etc...
I settled on allowing an env var to be exported, GIT_REMOTE_PATH which a user
can set to the path of git on the remote end.
I want to open up the discussion on whether this is the best way forward or if
there's another way I've missed.
Here's the patch that introduces this new feature:
--- cut here ---
Author: Kevin Green <Kevin.Green@morganstanley.com>
Date: Fri, 15 Jun 2007 10:51:21 -0400
Fix assumption that git is installed in a standard place on the remote end ssh
Introduce env var GIT_REMOTE_PATH which a user can set to the known remote path of
git during a push or pull through PROTO_SSH.
Signed-off-by: Kevin Green <Kevin.Green@morganstanley.com>
---
connect.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/connect.c b/connect.c
index 7fab9c0..ee15a8a 100644
--- a/connect.c
+++ b/connect.c
@@ -560,7 +560,13 @@ pid_t git_connect(int fd[2], char *url, const char *prog, int flags)
char *posn = command;
int size = MAX_CMD_LEN;
int of = 0;
+ const char *git_remote_path;
+ git_remote_path = getenv("GIT_REMOTE_PATH");
+ if (git_remote_path) {
+ of |= add_to_string(&posn, &size, git_remote_path, 0);
+ of |= add_to_string(&posn, &size, "/", 0);
+ }
of |= add_to_string(&posn, &size, prog, 0);
of |= add_to_string(&posn, &size, " ", 0);
of |= add_to_string(&posn, &size, path, 1);
--
1.5.2.1
next reply other threads:[~2007-06-15 15:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-15 15:03 Kevin Green [this message]
2007-06-15 15:30 ` [RFC][PATCH] Fix assumption that git is installed in a standard place on the remote end ssh Julian Phillips
2007-06-15 15:40 ` Kevin Green
2007-06-15 15:54 ` Raimund Bauer
2007-06-19 0:16 ` Johannes Schindelin
2007-06-22 1:30 ` Kevin Green
2007-06-22 10:47 ` Johannes Schindelin
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=20070615150351.GH14677@menevado.ms.com \
--to=kevin.t.green@morganstanley.com \
--cc=git@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.