sandboxrepo: set origin url differently for git 2.12.1?

This commit is contained in:
Paul Irish 2017-06-18 16:43:54 -07:00
parent e4970897f8
commit fd8b0aa991

View file

@ -196,12 +196,12 @@ function create_git_sandbox() {
git init -q git init -q
git config user.email "test@runner.com" && git config user.name "Test Runner" git config user.email "test@runner.com" && git config user.name "Test Runner"
# newer git auto-creates the origin remote # newer git auto-creates the origin remote
if [ $(git remote) ]; then if ! git remote add origin "github.com:paulirish/git-open.git"; then
git remote set-url origin "github.com:paulirish/git-open.git" git remote set-url origin "github.com:paulirish/git-open.git"
else
git remote add origin "github.com:paulirish/git-open.git"
fi fi
git checkout -B "master" git checkout -B "master"
echo "ok" > readme.txt echo "ok" > readme.txt