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 <[email protected]>
  • Loading branch information
dscho authored and Git for Windows Build Agent committed Aug 10, 2017
1 parent 9687714 commit a7b8007
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
3 changes: 0 additions & 3 deletions connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -833,9 +833,6 @@ struct child_process *git_connect(int fd[2], const char *url,
die("strange pathname '%s' blocked", path);

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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 a7b8007

Please sign in to comment.