Skip to content

Commit 8f64ef6

Browse files
authored
Merge pull request #181 from jpenilla/fix/git-config-cache-reuse
Populate GitCache from RepositoryValueSource when needed
2 parents 5ed575f + 35898b1 commit 8f64ef6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

indra-git/src/main/java/net/kyori/indra/git/RepositoryValueSource.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of indra, licensed under the MIT License.
33
*
4-
* Copyright (c) 2024 KyoriPowered
4+
* Copyright (c) 2024-2025 KyoriPowered
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal
@@ -62,7 +62,7 @@ public RepositoryValueSource() {
6262
@Override
6363
public final @Nullable V obtain() {
6464
final Parameters params = this.getParameters();
65-
final Git git = GitCache.get(params.getRootDir().get().getAsFile()).git(params.getProjectDir().get().getAsFile(), params.getDisplayName().get());
65+
final Git git = GitCache.getOrCreate(params.getRootDir().get().getAsFile()).git(params.getProjectDir().get().getAsFile(), params.getDisplayName().get());
6666
if (git == null) return null;
6767

6868
return this.obtain(git);

0 commit comments

Comments
 (0)