diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-04-06 23:38:28 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-04-06 23:38:29 +0300 |
commit | 87daf40750c9e344dd50495fdca1809aebcb1a94 (patch) | |
tree | 3f08482461e3484d5e77c7575c3fa35af28a33a4 /t/t7004-tag.sh | |
parent | e9dffbc7f11704bd25e5a36e41e5fe5c5d1f7183 (diff) | |
parent | 3611f7467fddcff6063ed2c99484047b410969fc (diff) |
Merge branch 'ab/config-multi-and-nonbool'
Assorted config API updates.
* ab/config-multi-and-nonbool:
for-each-repo: with bad config, don't conflate <path> and <cmd>
config API: add "string" version of *_value_multi(), fix segfaults
config API users: test for *_get_value_multi() segfaults
for-each-repo: error on bad --config
config API: have *_multi() return an "int" and take a "dest"
versioncmp.c: refactor config reading next commit
config API: add and use a "git_config_get()" family of functions
config tests: add "NULL" tests for *_get_value_multi()
config tests: cover blind spots in git_die_config() tests
Diffstat (limited to 't/t7004-tag.sh')
-rwxr-xr-x | t/t7004-tag.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh index 04a4b44183..32b312fa80 100755 --- a/t/t7004-tag.sh +++ b/t/t7004-tag.sh @@ -1871,6 +1871,23 @@ test_expect_success 'invalid sort parameter in configuratoin' ' test_must_fail git tag -l "foo*" ' +test_expect_success 'version sort handles empty value for versionsort.{prereleaseSuffix,suffix}' ' + cp .git/config .git/config.orig && + test_when_finished mv .git/config.orig .git/config && + + cat >>.git/config <<-\EOF && + [versionsort] + prereleaseSuffix + suffix + EOF + cat >expect <<-\EOF && + error: missing value for '\''versionsort.suffix'\'' + error: missing value for '\''versionsort.prereleasesuffix'\'' + EOF + git tag -l --sort=version:refname 2>actual && + test_cmp expect actual +' + test_expect_success 'version sort with prerelease reordering' ' test_config versionsort.prereleaseSuffix -rc && git tag foo1.6-rc1 && |