diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-11-09 14:06:26 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-11-09 14:06:26 -0800 |
commit | ecf95d938b390e1ee7c1df78b9ebe3a59ffd44c9 (patch) | |
tree | 521b6d2bc5ef5d51482e4313b9579ab80568b8ad /t/t5505-remote.sh | |
parent | Merge branch 'pb/ref-filter-with-crlf' (diff) | |
parent | remote: add meaningful exit code on missing/existing (diff) | |
download | tgif-ecf95d938b390e1ee7c1df78b9ebe3a59ffd44c9.tar.xz |
Merge branch 'ab/git-remote-exit-code'
Exit codes from "git remote add" etc. were not usable by scripted
callers.
* ab/git-remote-exit-code:
remote: add meaningful exit code on missing/existing
Diffstat (limited to 't/t5505-remote.sh')
-rwxr-xr-x | t/t5505-remote.sh | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh index 4b0de6cb83..eaa6e90220 100755 --- a/t/t5505-remote.sh +++ b/t/t5505-remote.sh @@ -145,8 +145,8 @@ 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 && + echo "error: No such remote: '\''foo'\''" >expect && + test_expect_code 2 git remote rm foo 2>actual && test_i18ncmp expect actual ) ' @@ -173,8 +173,8 @@ test_expect_success 'remove remote with a branch without configured merge' ' 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 && + echo "error: No such remote: '\''foo'\''" >expect && + test_expect_code 2 git remote rename foo bar 2>actual && test_i18ncmp expect actual ) ' @@ -188,16 +188,16 @@ test_expect_success 'rename errors out early when when new name is invalid' ' 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 && + echo "error: remote foo already exists." >expect && + test_expect_code 3 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 && + echo "error: remote bar already exists." >expect && + test_expect_code 3 git remote rename foo bar 2>actual && test_i18ncmp expect actual ' |