Skip to content
Permalink
Browse files

Revert "git_connect: prefer Git's builtins over dashed form"

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 0f3342804fc6fa558a7c9e220e7e9ab4c86e8226
Showing with 4 additions and 7 deletions.
  1. +0 −3 connect.c
  2. +3 −3 t/t5601-clone.sh
  3. +1 −1 t/t5602-clone-remote-exec.sh
@@ -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);

@@ -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)
@@ -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
'

0 comments on commit 0f33428

Please sign in to comment.
You can’t perform that action at this time.