Skip to content

Commit 8497e4b

Browse files
committed
chore(git): Use the more specific GitWorkingTree
Allow to use Git-specific features of the `WorkingTree`, which is clear to be a `GitWorkingTree` due to the cast on the caller side. Signed-off-by: Sebastian Schuberth <[email protected]>
1 parent b4aaec0 commit 8497e4b

File tree

1 file changed

+2
-2
lines changed
  • plugins/version-control-systems/git/src/main/kotlin

1 file changed

+2
-2
lines changed

plugins/version-control-systems/git/src/main/kotlin/Git.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ class Git(
208208
* configured [historyDepth][GitConfig.historyDepth] is respected.
209209
*/
210210
private fun updateWorkingTreeWithoutSubmodules(
211-
workingTree: WorkingTree,
211+
workingTree: GitWorkingTree,
212212
git: JGit,
213213
revision: String
214214
): Result<String> =
@@ -306,7 +306,7 @@ class Git(
306306
* [historyDepth][GitConfig.historyDepth]. If [updateNestedSubmodules][GitConfig.updateNestedSubmodules] is true,
307307
* submodules are initialized / updated recursively.
308308
*/
309-
private fun updateSubmodules(workingTree: WorkingTree) {
309+
private fun updateSubmodules(workingTree: GitWorkingTree) {
310310
if (!workingTree.getRootPath().resolve(".gitmodules").isFile) return
311311

312312
val recursive = "--recursive".takeIf { config.updateNestedSubmodules }

0 commit comments

Comments
 (0)