Skip to content

Commit

Permalink
Fix git commit parsing (#58528)
Browse files Browse the repository at this point in the history
BuildPlugin did not like `0`s in commit identifiers,
fixed.
  • Loading branch information
henningandersen committed Jun 25, 2020
1 parent c2c12bd commit 3ac2af5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,7 @@ class BuildPlugin implements Plugin<Project> {
revision = readFirstLine(refFile)
} else if (Files.exists(gitDir.resolve("packed-refs"))) {
// Check packed references for commit ID
Pattern p = Pattern.compile("^([a-f1-9]{40}) " + refName + "\$")
Pattern p = Pattern.compile("^([a-f0-9]{40}) " + refName + "\$")
Stream<String> lines = Files.lines(gitDir.resolve("packed-refs"));
try {
revision = lines.map( { s -> p.matcher(s) })
Expand Down

0 comments on commit 3ac2af5

Please sign in to comment.