From: Johannes Sixt <j.sixt@viscovery.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Jakub Narebski <jnareb@gmail.com>,
Elijah Newren <newren@gmail.com>,
git@vger.kernel.org
Subject: [PATCH] upload-pack: Initialize the exec-path.
Date: Tue, 12 Feb 2008 12:28:01 +0100 [thread overview]
Message-ID: <47B182C1.60006@viscovery.net> (raw)
In-Reply-To: <alpine.LSU.1.00.0802121028290.3870@racer.site>
From: Johannes Sixt <johannes.sixt@telecom.at>
Since git-upload-pack has to spawn git-pack-objects, it has to make sure
that the latter can be found in the PATH. Without this patch an attempt
to clone or pull via ssh from a server fails if the git tools are not in
the standard PATH on the server even though git clone or git pull were
invoked with --upload-pack=/path/to/git-upload-pack.
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
---
Johannes Schindelin schrieb:
> Hi,
>
> On Tue, 12 Feb 2008, Johannes Sixt wrote:
>> The problem is that git-upload-pack (which is not a built-in) does not
>> call setup_path() and so does not extend PATH to contain the special
>> installation location. Now, when git-upload-pack tries to exec
>> git-pack-objects, it fails since this is not in PATH.
>
> So, let's make git-upload-pack a builtin, no?
How about this (almost) one-liner instead?
-- Hannes
upload-pack.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/upload-pack.c b/upload-pack.c
index 7e04311..51e3ec4 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -620,6 +620,9 @@ int main(int argc, char **argv)
if (i != argc-1)
usage(upload_pack_usage);
+
+ setup_path(NULL);
+
dir = argv[i];
if (!enter_repo(dir, strict))
--
1.5.4.rc3.24.g25a9a
next prev parent reply other threads:[~2008-02-12 11:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-12 2:22 Unable to clone an ssh repository (with ugly installation-specific workaround) Elijah Newren
2008-02-12 7:04 ` David Symonds
2008-02-12 8:16 ` Jakub Narebski
2008-02-12 8:37 ` Johannes Sixt
2008-02-12 10:30 ` Johannes Schindelin
2008-02-12 11:28 ` Johannes Sixt [this message]
2008-02-12 11:49 ` [PATCH] upload-pack: Initialize the exec-path Johannes Schindelin
2008-02-12 12:45 ` Johannes Schindelin
2008-02-13 13:00 ` Elijah Newren
2008-02-13 12:57 ` Unable to clone an ssh repository (with ugly installation-specific workaround) Elijah Newren
2008-02-13 14:17 ` Stephen Sinclair
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=47B182C1.60006@viscovery.net \
--to=j.sixt@viscovery.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
--cc=newren@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).