aboutsummaryrefslogtreecommitdiff
path: root/ssh-pull.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-07 14:23:46 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-07 14:23:46 -0700
commit001d4a27dbfaaa59c25dc35dafc69bd9b9bc21d3 (patch)
treeb7b89d84be5025133535999f9c3644996ba6520a /ssh-pull.c
parent972d1bb067d0cea6334da081f6a3e2a6bad6f20b (diff)
downloadgit-001d4a27dbfaaa59c25dc35dafc69bd9b9bc21d3.tar.gz
git-001d4a27dbfaaa59c25dc35dafc69bd9b9bc21d3.tar.xz
git-ssh-push/pull: usability improvements
Allow traditional ssh path specifiers (host:path), and let the user override the command name on the other end. With this, I can push to kernel.org with this script export GIT_SSH_PULL=/home/torvalds/bin/git-ssh-pull git-ssh-push -a -v -w heads/master heads/master master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git which while not pretty is at least workable.
Diffstat (limited to 'ssh-pull.c')
-rw-r--r--ssh-pull.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ssh-pull.c b/ssh-pull.c
index c2cb59a65..27484126d 100644
--- a/ssh-pull.c
+++ b/ssh-pull.c
@@ -58,6 +58,7 @@ int main(int argc, char **argv)
char *commit_id;
char *url;
int arg = 1;
+ const char *prog = getenv("GIT_SSH_PUSH") ? : "git-ssh-push";
while (arg < argc && argv[arg][0] == '-') {
if (argv[arg][1] == 't') {
@@ -87,7 +88,7 @@ int main(int argc, char **argv)
commit_id = argv[arg];
url = argv[arg + 1];
- if (setup_connection(&fd_in, &fd_out, "git-ssh-push", url, arg, argv + 1))
+ if (setup_connection(&fd_in, &fd_out, prog, url, arg, argv + 1))
return 1;
if (get_version())