Skip to content

Commit 3a346df

Browse files
committed
chore(git): Use the .runGit() extension function for convenience
Signed-off-by: Sebastian Schuberth <[email protected]>
1 parent 8497e4b commit 3a346df

File tree

1 file changed

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

1 file changed

+2
-3
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ class Git(
270270
}.mapCatching { fetchResult ->
271271
// TODO: Migrate this to JGit once sparse checkout (https://bugs.eclipse.org/bugs/show_bug.cgi?id=383772) is
272272
// implemented. Also see the "reset" call below.
273-
GitCommand.run("checkout", revision, workingDir = workingTree.getRootPath()).requireSuccess()
273+
workingTree.runGit("checkout", revision)
274274

275275
// In case of a non-fixed revision (branch or tag) reset the working tree to ensure that the previously
276276
// fetched changes are applied.
@@ -294,8 +294,7 @@ class Git(
294294
"Requested revision '$revision' not found in refs advertised by the server."
295295
}
296296

297-
GitCommand.run("reset", "--hard", resolvedRevision, workingDir = workingTree.getRootPath())
298-
.requireSuccess()
297+
workingTree.runGit("reset", "--hard", resolvedRevision)
299298
}
300299

301300
revision

0 commit comments

Comments
 (0)