From fd8b0aa9918d647fbd12df91c821191c541abb49 Mon Sep 17 00:00:00 2001 From: Paul Irish Date: Sun, 18 Jun 2017 16:43:54 -0700 Subject: [PATCH] sandboxrepo: set origin url differently for git 2.12.1? --- test/git-open.bats | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/git-open.bats b/test/git-open.bats index 7846852..7bc1c03 100644 --- a/test/git-open.bats +++ b/test/git-open.bats @@ -196,12 +196,12 @@ function create_git_sandbox() { git init -q git config user.email "test@runner.com" && git config user.name "Test Runner" + # 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" - else - git remote add origin "github.com:paulirish/git-open.git" fi + git checkout -B "master" echo "ok" > readme.txt