diff options
author | Junio C Hamano <junkio@cox.net> | 2005-08-10 00:10:18 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-08-10 00:10:18 -0700 |
commit | f69714c38c6f3296a4bfba0d057e0f1605373f49 (patch) | |
tree | 2d850f14f62d33ed514e2b197b63fe459ff20d37 /connect.c | |
parent | Merge with master. (diff) | |
parent | Skip merges in format-patch. (diff) | |
download | tgif-f69714c38c6f3296a4bfba0d057e0f1605373f49.tar.xz |
Merge with master.
This merges commit
c35a7b8d806317dc1762e36561cbd31c2530dd9c
from master into our head commit
edee414c3e5a546aae3dd1529f397df949713305
Sincerely,
jit-merge command.
Diffstat (limited to 'connect.c')
-rw-r--r-- | connect.c | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -166,7 +166,8 @@ static int match_explicit_refs(struct ref *src, struct ref *dst, if (matched_src) break; errs = 1; - error("src refspec %s does not match any."); + error("src refspec %s does not match any.", + rs[i].src); break; default: errs = 1; @@ -381,8 +382,15 @@ int git_connect(int fd[2], char *url, const char *prog) close(pipefd[0][1]); close(pipefd[1][0]); close(pipefd[1][1]); - if (protocol == PROTO_SSH) - execlp("ssh", "ssh", host, command, NULL); + if (protocol == PROTO_SSH) { + const char *ssh = getenv("GIT_SSH") ? : "ssh"; + const char *ssh_basename = strrchr(ssh, '/'); + if (!ssh_basename) + ssh_basename = ssh; + else + ssh_basename++; + execlp(ssh, ssh_basename, host, command, NULL); + } else execlp("sh", "sh", "-c", command, NULL); die("exec failed"); |