aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorUsman Akinyemi <usmanakinyemi202@gmail.com>2025-04-08 01:28:41 +0530
committerJunio C Hamano <gitster@pobox.com>2025-04-08 14:47:37 -0700
commit9ec327d922298f7adfa366c1d1ab2a795985c51e (patch)
tree39ac2e01b1c21300fdd9be10ed4ff81c1f94d606 /t
parentStart 2.50 cycle (batch #1) (diff)
downloadgit-9ec327d922298f7adfa366c1d1ab2a795985c51e.tar.gz
git-9ec327d922298f7adfa366c1d1ab2a795985c51e.zip
builtin/update-server-info: remove unnecessary if statement
Since we already teach the `repo_config()` in f29f1990 (config: teach repo_config to allow `repo` to be NULL, 2025-03-08) to allow `repo` to be NULL, no need to check if `repo` is NULL before calling `repo_config()`. Mentored-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t1517-outside-repo.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
index dbd8cd6906..6824581317 100755
--- a/t/t1517-outside-repo.sh
+++ b/t/t1517-outside-repo.sh
@@ -107,4 +107,11 @@ test_expect_success LIBCURL 'remote-http outside repository' '
test_grep "^error: remote-curl" actual
'
+test_expect_success 'update-server-info does not crash with -h' '
+ test_expect_code 129 git update-server-info -h >usage &&
+ test_grep "[Uu]sage: git update-server-info " usage &&
+ test_expect_code 129 nongit git update-server-info -h >usage &&
+ test_grep "[Uu]sage: git update-server-info " usage
+'
+
test_done