diff options
author | René Scharfe <l.s.r@web.de> | 2023-12-06 14:51:58 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-12-09 01:41:03 +0300 |
commit | 81fb70f55e93ca0b5f013284e15aec0ee9f79824 (patch) | |
tree | 996cface6057ad30d5558815e4b3251825177af7 /t | |
parent | fa518aef564a24649ee6d8bbb29ed9c183a4b7c5 (diff) |
revision, rev-parse: factorize incompatibility messages about - -exclude-hidden
Use the standard parameterized message for reporting incompatible
options to report options that are not accepted in combination with
--exclude-hidden. This reduces the number of strings to translate and
makes the UI a bit more consistent.
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t6018-rev-list-glob.sh | 6 | ||||
-rwxr-xr-x | t/t6021-rev-list-exclude-hidden.sh | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/t/t6018-rev-list-glob.sh b/t/t6018-rev-list-glob.sh index 67d523d405..3b181f771c 100755 --- a/t/t6018-rev-list-glob.sh +++ b/t/t6018-rev-list-glob.sh @@ -214,15 +214,13 @@ do for pseudoopt in branches tags remotes do test_expect_success "rev-parse --exclude-hidden=$section fails with --$pseudoopt" ' - echo "error: --exclude-hidden cannot be used together with --$pseudoopt" >expected && test_must_fail git rev-parse --exclude-hidden=$section --$pseudoopt 2>err && - test_cmp expected err + test_grep "error: options .--exclude-hidden. and .--$pseudoopt. cannot be used together" err ' test_expect_success "rev-parse --exclude-hidden=$section fails with --$pseudoopt=pattern" ' - echo "error: --exclude-hidden cannot be used together with --$pseudoopt" >expected && test_must_fail git rev-parse --exclude-hidden=$section --$pseudoopt=pattern 2>err && - test_cmp expected err + test_grep "error: options .--exclude-hidden. and .--$pseudoopt. cannot be used together" err ' done done diff --git a/t/t6021-rev-list-exclude-hidden.sh b/t/t6021-rev-list-exclude-hidden.sh index cdf7aa9427..51df02105d 100755 --- a/t/t6021-rev-list-exclude-hidden.sh +++ b/t/t6021-rev-list-exclude-hidden.sh @@ -151,12 +151,12 @@ do do test_expect_success "$section: fails with --$pseudoopt" ' test_must_fail git rev-list --exclude-hidden=$section --$pseudoopt 2>err && - test_grep "error: --exclude-hidden cannot be used together with --$pseudoopt" err + test_grep "error: options .--exclude-hidden. and .--$pseudoopt. cannot be used together" err ' test_expect_success "$section: fails with --$pseudoopt=pattern" ' test_must_fail git rev-list --exclude-hidden=$section --$pseudoopt=pattern 2>err && - test_grep "error: --exclude-hidden cannot be used together with --$pseudoopt" err + test_grep "error: options .--exclude-hidden. and .--$pseudoopt. cannot be used together" err ' done done |