git-lfs/t/t-ssh.sh
brian m. carlson 9e006ac4e2
Rename default branch in tests to "main"
Currently, our default branch in tests is "master".  This is the Git
default, but the Git default will likely change in the future, so it
makes sense to update our testsuite to be explicit about the branch
name.  We'll ensure this continues by building against older versions of
Git as well as newer versions.

We use "main" for the new branch name, since that's the proposed value
upstream.

This commit was made entirely by automated means using the following
command:

  git grep -l master t | xargs sed -i -e 's/master/main/g'
2020-07-08 15:38:17 +00:00

34 lines
746 B
Bash
Executable File

#!/usr/bin/env bash
. "$(dirname "$0")/testlib.sh"
begin_test "ssh with proxy command in lfs.url"
(
set -e
reponame="batch-ssh-proxy"
setup_remote_repo "$reponame"
clone_repo "$reponame" "$reponame"
sshurl="${GITSERVER/http:\/\//ssh://-oProxyCommand=ssh-proxy-test/}/$reponame"
echo $sshurl
git config lfs.url "$sshurl"
contents="test"
oid="$(calc_oid "$contents")"
git lfs track "*.dat"
printf "%s" "$contents" > test.dat
git add .gitattributes test.dat
git commit -m "initial commit"
git push origin main 2>&1 | tee push.log
if [ "0" -eq "${PIPESTATUS[0]}" ]; then
echo >&2 "fatal: push succeeded"
exit 1
fi
grep "got 4 args" push.log
grep "lfs-ssh-echo -- -oProxyCommand" push.log
)
end_test