1
0
Fork 0
mirror of https://github.com/NixOS/hydra.git synced 2024-10-18 17:02:28 -04:00

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);