mirror of
https://github.com/git/git.git
synced 2026-03-31 03:50:10 +02:00
Merge branch 'rc/ls-remote-default' into next
* rc/ls-remote-default: ls-remote: print URL when no repo is specified
This commit is contained in:
@@ -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 <url>" with -q' '
|
||||
|
||||
git ls-remote -q 2>actual_err &&
|
||||
test_must_fail test_cmp exp_err actual_err
|
||||
|
||||
'
|
||||
|
||||
test_expect_success 'use branch.<name>.remote if possible' '
|
||||
|
||||
#
|
||||
@@ -78,10 +90,14 @@ test_expect_success 'use branch.<name>.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
|
||||
|
||||
'
|
||||
|
||||
Reference in New Issue
Block a user