Skip to content

Commit 0f33428

Browse files
committed
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 <[email protected]>
1 parent f0a126c commit 0f33428

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

connect.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -825,9 +825,6 @@ struct child_process *git_connect(int fd[2], const char *url,
825825
child_process_init(conn);
826826

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

t/t5601-clone.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,13 +332,13 @@ expect_ssh () {
332332
1)
333333
;;
334334
2)
335-
echo "ssh: $1 git upload-pack '$2'"
335+
echo "ssh: $1 git-upload-pack '$2'"
336336
;;
337337
3)
338-
echo "ssh: $1 $2 git upload-pack '$3'"
338+
echo "ssh: $1 $2 git-upload-pack '$3'"
339339
;;
340340
*)
341-
echo "ssh: $1 $2 git upload-pack '$3' $4"
341+
echo "ssh: $1 $2 git-upload-pack '$3' $4"
342342
esac
343343
} >"$TRASH_DIRECTORY/ssh-expect" &&
344344
(cd "$TRASH_DIRECTORY" && test_cmp ssh-expect ssh-output)

t/t5602-clone-remote-exec.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ test_expect_success setup '
1313

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

0 commit comments

Comments
 (0)