@@ -288,7 +288,7 @@ test_expect_success 'receive-pack de-dupes .have lines' '
$shared .have
EOF
- GIT_TRACE_PACKET=$(pwd)/trace \
+ GIT_TRACE_PACKET=$(pwd)/trace GIT_TEST_PROTOCOL_VERSION= \
git push \
--receive-pack="unset GIT_TRACE_PACKET; git-receive-pack" \
fork HEAD:foo &&
@@ -325,7 +325,7 @@ copy_ssh_wrapper_as () {
expect_ssh () {
test_when_finished '
- (cd "$TRASH_DIRECTORY" && rm -f ssh-expect && >ssh-output)
+ (cd "$TRASH_DIRECTORY" && rm -f ssh-expect ssh-output.munged && >ssh-output)
' &&
{
case "$#" in
@@ -341,7 +341,14 @@ expect_ssh () {
echo "ssh: $1 $2 git-upload-pack '$3' $4"
esac
} >"$TRASH_DIRECTORY/ssh-expect" &&
- (cd "$TRASH_DIRECTORY" && test_cmp ssh-expect ssh-output)
+ (
+ cd "$TRASH_DIRECTORY" &&
+ # We don't care about this trivial difference in
+ # output with GIT_TEST_PROTOCOL_VERSION=[12]
+ sed 's/ssh: -o SendEnv=GIT_PROTOCOL /ssh: /' <ssh-output >ssh-output.munged &&
+ mv ssh-output.munged ssh-output &&
+ test_cmp ssh-expect ssh-output
+ )
}
test_expect_success 'clone myhost:src uses ssh' '
There's one t5400-send-pack.sh test which is broken under GIT_TEST_PROTOCOL_VERSION=1. It's easier to just coerce it to run under protocol 1. The difference in the output is that there'll be a "version 1" line which'll make the subsequent "test_cmp". See protocol.version in git-config(1) which notes that "1" is just "0" with a version number. the trace output will include fail. Similarly in t5601-clone.sh we'll be passing an option to ssh, but since so many tests would fail in this file let's go above & beyond and make them pass by only testing the relevant part of the output. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> --- t/t5400-send-pack.sh | 2 +- t/t5601-clone.sh | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-)