Use git rev-list --count

This commit is contained in:
Eelco Dolstra 2017-11-14 16:18:54 +01:00
parent 5216b7eb2c
commit 100249c066
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -233,7 +233,7 @@ sub fetchInput {
# number of commits in the history of this revision (revCount) # number of commits in the history of this revision (revCount)
# the output of git-describe (gitTag), and the abbreviated # the output of git-describe (gitTag), and the abbreviated
# revision (shortRev). # revision (shortRev).
my $revCount = scalar(split '\n', grab(cmd => ["git", "rev-list", "$revision"], dir => $clonePath)); my $revCount = grab(cmd => ["git", "rev-list", "--count", "$revision"], dir => $clonePath, chomp => 1);
my $gitTag = grab(cmd => ["git", "describe", "--always", "$revision"], dir => $clonePath, chomp => 1); my $gitTag = grab(cmd => ["git", "describe", "--always", "$revision"], dir => $clonePath, chomp => 1);
my $shortRev = grab(cmd => ["git", "rev-parse", "--short", "$revision"], dir => $clonePath, chomp => 1); my $shortRev = grab(cmd => ["git", "rev-parse", "--short", "$revision"], dir => $clonePath, chomp => 1);