diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2015-02-26 17:44:01 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-02-27 13:38:22 -0800 |
commit | d811c8e17c652e62a97e75abf80dfea5d81ef309 (patch) | |
tree | 047e6678d308dd8032e6a09501764974bc31f93e /t | |
parent | Git 2.2.2 (diff) | |
download | tgif-d811c8e17c652e62a97e75abf80dfea5d81ef309.tar.xz |
versionsort: support reorder prerelease suffixes
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t7004-tag.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh index 796e9f79ea..5674fe9f72 100755 --- a/t/t7004-tag.sh +++ b/t/t7004-tag.sh @@ -1459,6 +1459,34 @@ test_expect_success 'invalid sort parameter in configuratoin' ' test_cmp expect actual ' +test_expect_success 'version sort with prerelease reordering' ' + git config --unset tag.sort && + git config versionsort.prereleaseSuffix -rc && + git tag foo1.6-rc1 && + git tag foo1.6-rc2 && + git tag -l --sort=version:refname "foo*" >actual && + cat >expect <<-\EOF && + foo1.3 + foo1.6-rc1 + foo1.6-rc2 + foo1.6 + foo1.10 + EOF + test_cmp expect actual +' + +test_expect_success 'reverse version sort with prerelease reordering' ' + git tag -l --sort=-version:refname "foo*" >actual && + cat >expect <<-\EOF && + foo1.10 + foo1.6 + foo1.6-rc2 + foo1.6-rc1 + foo1.3 + EOF + test_cmp expect actual +' + run_with_limited_stack () { (ulimit -s 128 && "$@") } |