Skip to content

Commit

Permalink
fix: git tag --sort option is not available before git 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Insomnia1437 committed Apr 22, 2024
1 parent 32b9bc0 commit ee658bc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mrfCommon/src/genVersionHeader.pl
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@
}
if(!$foundvcs && -d "$opt_t/.git") {
# same format as Mercurial
my @tags = `git --git-dir="$opt_t/.git" tag --sort=-creatordate`;

my @tags = `git --git-dir="$opt_t/.git" for-each-ref --sort=-creatordate --format='%(refname:short)' refs/tags`;
my $valid_tag;
# find first tag which starts from number
foreach my $tag (@tags) {
Expand Down

0 comments on commit ee658bc

Please sign in to comment.