diff --git a/src/main/scala/esmeta/util/Git.scala b/src/main/scala/esmeta/util/Git.scala index e881013bf2..a0b67006cc 100644 --- a/src/main/scala/esmeta/util/Git.scala +++ b/src/main/scala/esmeta/util/Git.scala @@ -46,7 +46,7 @@ abstract class Git(path: String, shortHashLength: Int = 16) { self => /** get git commit version */ def getVersion(target: String): Version = val name = executeCmd(s"git name-rev --name-only $target", path).trim - val hash = executeCmd(s"git rev-parse $target", path).trim + val hash = executeCmd(s"git rev-list -n 1 $target", path).trim Version(name, hash) /** get git commit hash for the current version */