X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=t%2Ft5512-ls-remote.sh;h=d1912351db7da4a7c457fd44895b5ea076c84e7e;hb=48c250a121a425a1860226b6a7061aecfbab5246;hp=3cf1b3da40a8d99631fabaa2cce4ff2b6d1b52ac;hpb=6c6f87842bcb8ac4d36922cec5b5ce25de14756e;p=git.git diff --git a/t/t5512-ls-remote.sh b/t/t5512-ls-remote.sh index 3cf1b3da4..d1912351d 100755 --- a/t/t5512-ls-remote.sh +++ b/t/t5512-ls-remote.sh @@ -57,12 +57,24 @@ test_expect_success 'dies when no remote specified and no default remotes found' test_expect_success 'use "origin" when no remote specified' ' - git remote add origin "$(pwd)/.git" && - git ls-remote >actual && + URL="$(pwd)/.git" && + echo "From $URL" >exp_err && + + git remote add origin "$URL" && + git ls-remote 2>actual_err >actual && + + test_cmp exp_err actual_err && test_cmp expected.all actual ' +test_expect_success 'suppress "From " with -q' ' + + git ls-remote -q 2>actual_err && + test_must_fail test_cmp exp_err actual_err + +' + test_expect_success 'use branch..remote if possible' ' # @@ -78,10 +90,14 @@ test_expect_success 'use branch..remote if possible' ' git show-ref | sed -e "s/ / /" ) >exp && - git remote add other other.git && + URL="other.git" && + echo "From $URL" >exp_err && + + git remote add other $URL && git config branch.master.remote other && - git ls-remote >actual && + git ls-remote 2>actual_err >actual && + test_cmp exp_err actual_err && test_cmp exp actual '