Skip to content

Commit

Permalink
Revert "GlobalBuildInfo support packed-refs with work-tree (elastic#5…
Browse files Browse the repository at this point in the history
…0791)"

This reverts commit 7bebc65.
  • Loading branch information
pgomulka committed Jun 25, 2020
1 parent d12a209 commit 662d3ac
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1138,10 +1138,10 @@ class BuildPlugin implements Plugin<Project> {
Path refFile = gitDir.resolve(refName)
if (Files.exists(refFile)) {
revision = readFirstLine(refFile)
} else if (Files.exists(gitDir.resolve("packed-refs"))) {
} else if (Files.exists(dotGit.resolve("packed-refs"))) {
// Check packed references for commit ID
Pattern p = Pattern.compile("^([a-f1-9]{40}) " + refName + "\$")
Stream<String> lines = Files.lines(gitDir.resolve("packed-refs"));
Stream<String> lines = Files.lines(dotGit.resolve("packed-refs"));
try {
revision = lines.map( { s -> p.matcher(s) })
.filter( { m -> m.matches() })
Expand Down

0 comments on commit 662d3ac

Please sign in to comment.