Skip to content

Commit

Permalink
[patch] moving the pull in
Browse files Browse the repository at this point in the history
  • Loading branch information
robertfmurdock committed Sep 19, 2024
1 parent 442de76 commit de18a78
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ class GitAdapter(private val workingDirectory: String) {
fun addRemote(name: String, url: String) {
runProcess(listOf("git", "remote", "add", name, url), workingDirectory)
}

fun fetch() {
runProcess(listOf("git", "fetch"), workingDirectory)
}
}

data class GitStatus(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@ fun initializeGitRepo(
gitAdapter.newAnnotatedTag(initialTag, "HEAD", "Funky Testerson", "[email protected]")
}
}

gitAdapter.addRemote(name = "origin", url = remoteUrl)
gitAdapter.fetch()
val grgit = Grgit.open(mapOf("dir" to directory))
grgit.pull()
grgit.branch.change(
fun BranchChangeOp.() {
this.name = "master"
Expand Down

0 comments on commit de18a78

Please sign in to comment.