1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2025-08-15 10:31:47 +02:00

[TC] Add some logging

This commit is contained in:
Alex Plate
2023-07-27 12:49:40 +03:00
parent 6967416207
commit bef928a20c

@@ -15,9 +15,16 @@ fun main(args: Array<String>) {
val (lastVersion, objectId) = getVersion(projectDir, onlyStable = true)
println("Last version: $lastVersion, hash: ${objectId.name}")
val branch = getRepo(projectDir).branch
check(branch == "master") {
"We should be on master branch"
}
val git = getGit(projectDir)
val logDiff = git.log().setMaxCount(500).call().takeWhile { it.id.name != objectId.name }
val log = git.log().setMaxCount(500).call()
println("First commit hash in log: " + log.first().name)
val logDiff = log.takeWhile { it.id.name != objectId.name }
val numCommits = logDiff.size
println("Log diff size is $numCommits")
check(numCommits < 450) {
"More than 450 commits detected since the last release. This is suspicious."
}