mirror of
https://github.com/git/git.git
synced 2026-03-23 23:20:06 +01:00
Merge branch 'tg/git-remote'
The internal API to interact with "remote.*" configuration variables has been streamlined. * tg/git-remote: remote: use remote_is_configured() for add and rename remote: actually check if remote exits remote: simplify remote_is_configured() remote: use parse_config_key
This commit is contained in:
@@ -144,6 +144,39 @@ test_expect_success 'remove remote protects local branches' '
|
||||
)
|
||||
'
|
||||
|
||||
test_expect_success 'remove errors out early when deleting non-existent branch' '
|
||||
(
|
||||
cd test &&
|
||||
echo "fatal: No such remote: foo" >expect &&
|
||||
test_must_fail git remote rm foo 2>actual &&
|
||||
test_i18ncmp expect actual
|
||||
)
|
||||
'
|
||||
|
||||
test_expect_success 'rename errors out early when deleting non-existent branch' '
|
||||
(
|
||||
cd test &&
|
||||
echo "fatal: No such remote: foo" >expect &&
|
||||
test_must_fail git remote rename foo bar 2>actual &&
|
||||
test_i18ncmp expect actual
|
||||
)
|
||||
'
|
||||
|
||||
test_expect_success 'add existing foreign_vcs remote' '
|
||||
test_config remote.foo.vcs bar &&
|
||||
echo "fatal: remote foo already exists." >expect &&
|
||||
test_must_fail git remote add foo bar 2>actual &&
|
||||
test_i18ncmp expect actual
|
||||
'
|
||||
|
||||
test_expect_success 'add existing foreign_vcs remote' '
|
||||
test_config remote.foo.vcs bar &&
|
||||
test_config remote.bar.vcs bar &&
|
||||
echo "fatal: remote bar already exists." >expect &&
|
||||
test_must_fail git remote rename foo bar 2>actual &&
|
||||
test_i18ncmp expect actual
|
||||
'
|
||||
|
||||
cat >test/expect <<EOF
|
||||
* remote origin
|
||||
Fetch URL: $(pwd)/one
|
||||
|
||||
Reference in New Issue
Block a user