How do I use GitLineHandler to retrieve the logs of a user?
Answered
I can successfully obtain logs in the following ways.
val handler = GitLineHandler(project, repo.root, GitCommand.LOG)
val result = Git.getInstance().runCommand(handler)
if (result.success()) {
result.output.forEach { line
println(line)
}
}When I try to retrieve the logs of a specific user, it returns empty.
val handler = GitLineHandler(project, repo.root, GitCommand.LOG)
handler.addParameters("--committer=\"coolbee\"")
val result = Git.getInstance().runCommand(handler)
if (result.success()) {
result.output.forEach { line
println(line)
}
}I also tried to change --committer to --author, but it didn't help. Did I miss something?
Please sign in to leave a comment.
Hi,
After you set the author parameter, try to call: