Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ public class GitInfoProvider {
INSTANCE.registerGitInfoBuilder(new UserSuppliedGitInfoBuilder());
}

static final String NULL_PATH_STRING = Paths.get("").toAbsolutePath().toString();

private volatile Collection<GitInfoBuilder> builders = Collections.emptyList();

// in regular cases git info has to be built only once,
Expand All @@ -42,7 +44,7 @@ public GitInfo getGitInfo() {

public GitInfo getGitInfo(@Nullable String repositoryPath) {
if (repositoryPath == null) {
repositoryPath = Paths.get("").toAbsolutePath().toString();
repositoryPath = NULL_PATH_STRING;
}
return gitInfoCache.computeIfAbsent(repositoryPath, this::buildGitInfo);
}
Expand Down
Loading