Skip to content

Commit

Permalink
Revert "git_connect: prefer Git's builtins over dashed form"
Browse files Browse the repository at this point in the history
It would appear that this change (which was intended to fix tests
interacting with local repositories when `git-upload-pack` was not in the
`PATH`) regresses on SSH access.

This reverts commit 40023e5 and fixes
#1258.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Aug 7, 2017
1 parent f0a126c commit 0f33428
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
3 changes: 0 additions & 3 deletions connect.c
Expand Up @@ -825,9 +825,6 @@ struct child_process *git_connect(int fd[2], const char *url,
child_process_init(conn);

strbuf_addstr(&cmd, prog);
/* Prefer the builtin */
if (starts_with(prog, "git-"))
cmd.buf[3] = ' ';
strbuf_addch(&cmd, ' ');
sq_quote_buf(&cmd, path);

Expand Down
6 changes: 3 additions & 3 deletions t/t5601-clone.sh
Expand Up @@ -332,13 +332,13 @@ expect_ssh () {
1)
;;
2)
echo "ssh: $1 git upload-pack '$2'"
echo "ssh: $1 git-upload-pack '$2'"
;;
3)
echo "ssh: $1 $2 git upload-pack '$3'"
echo "ssh: $1 $2 git-upload-pack '$3'"
;;
*)
echo "ssh: $1 $2 git upload-pack '$3' $4"
echo "ssh: $1 $2 git-upload-pack '$3' $4"
esac
} >"$TRASH_DIRECTORY/ssh-expect" &&
(cd "$TRASH_DIRECTORY" && test_cmp ssh-expect ssh-output)
Expand Down
2 changes: 1 addition & 1 deletion t/t5602-clone-remote-exec.sh
Expand Up @@ -13,7 +13,7 @@ test_expect_success setup '

test_expect_success 'clone calls git upload-pack unqualified with no -u option' '
test_must_fail env GIT_SSH=./not_ssh git clone localhost:/path/to/repo junk &&
echo "localhost git upload-pack '\''/path/to/repo'\''" >expected &&
echo "localhost git-upload-pack '\''/path/to/repo'\''" >expected &&
test_cmp expected not_ssh_output
'

Expand Down

0 comments on commit 0f33428

Please sign in to comment.