ijuma commented on code in PR #13315: URL: https://github.com/apache/kafka/pull/13315#discussion_r1120878251
########## build.gradle: ########## @@ -159,16 +159,9 @@ def determineCommitId() { def takeFromHash = 16 if (project.hasProperty('commitId')) { commitId.take(takeFromHash) - } else if (file("$rootDir/.git/HEAD").exists()) { - def headRef = file("$rootDir/.git/HEAD").text - if (headRef.contains('ref: ')) { - headRef = headRef.replaceAll('ref: ', '').trim() - if (file("$rootDir/.git/$headRef").exists()) { - file("$rootDir/.git/$headRef").text.trim().take(takeFromHash) - } - } else { - headRef.trim().take(takeFromHash) - } + } else if (file("$rootDir/.git").exists()) { + def repo = Grgit.open(currentDir: project.getRootDir()) Review Comment: The `rat` configuration does something similar, maybe we should have a variable for the git repo that can be used by both tasks. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org