X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=rsh.c;h=fe87e581d21d0465da9e3fadef0454c69640caa7;hb=44ab20cd884dcb3d2ef4cfbda4591dd2cd9bee79;hp=5615c74e7d5f4e5f9d93c0f90c6f57fe8b41442f;hpb=b389237ae8cd04c2f53db52e37c02e30c63bcc89;p=git.git diff --git a/rsh.c b/rsh.c index 5615c74e..fe87e581 100644 --- a/rsh.c +++ b/rsh.c @@ -41,6 +41,7 @@ int setup_connection(int *fd_in, int *fd_out, const char *remote_prog, snprintf(command, COMMAND_SIZE, "%s='%s' %s", GIT_DIR_ENVIRONMENT, path, remote_prog); + *path = '\0'; posn = command + strlen(command); for (i = 0; i < rmt_argc; i++) { *(posn++) = ' ';