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@xxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxxx> --- 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 - 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