summaryrefslogtreecommitdiff
path: root/t/t5505-remote.sh
diff options
context:
space:
mode:
authorShulhan <m.shulhan@gmail.com>2018-09-13 13:18:33 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-09-14 16:38:18 (GMT)
commit5025425dffffb4424b746de9209f874ab8b5d179 (patch)
treef2128c0bb0eb50fd910c98f3f8848c4ab2cf5a0a /t/t5505-remote.sh
parent1d4361b0f344188ab5eec6dcea01f61a3a3a1670 (diff)
downloadgit-5025425dffffb4424b746de9209f874ab8b5d179.zip
git-5025425dffffb4424b746de9209f874ab8b5d179.tar.gz
git-5025425dffffb4424b746de9209f874ab8b5d179.tar.bz2
builtin/remote: quote remote name on error to display empty name
When adding new remote name with empty string, git will print the following error message, fatal: '' is not a valid remote name\n But when removing remote name with empty string as input, git shows the empty string without quote, fatal: No such remote: \n To make these error messages consistent, quote the name of the remote that we tried and failed to find. Signed-off-by: Shulhan <m.shulhan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5505-remote.sh')
-rwxr-xr-xt/t5505-remote.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh
index 241e6a3..d2a2cdd 100755
--- a/t/t5505-remote.sh
+++ b/t/t5505-remote.sh
@@ -145,7 +145,7 @@ 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 &&
+ echo "fatal: No such remote: '\''foo'\''" >expect &&
test_must_fail git remote rm foo 2>actual &&
test_i18ncmp expect actual
)
@@ -173,7 +173,7 @@ 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 &&
+ echo "fatal: No such remote: '\''foo'\''" >expect &&
test_must_fail git remote rename foo bar 2>actual &&
test_i18ncmp expect actual
)