Skip to content

Commit

Permalink
Merge pull request #343 from qtzar/FixBranchCloning
Browse files Browse the repository at this point in the history
Fix regression bug to get branch names.
  • Loading branch information
jp7677 authored Oct 25, 2023
2 parents b83d687 + c39b906 commit 0c99ab2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class ClonedRepository(

fun getBranchNames(excludeBranches: List<String>) =
Git(repo).branchList().setListMode(ListBranchCommand.ListMode.REMOTE).call()
.map { it.name.toString().substringAfter("/") }
.map { it.name.toString().substringAfter("/remotes/origin/") }
.onEach { println("Found the following branch: $it") }
.filter { it !in excludeBranches }

Expand Down

0 comments on commit 0c99ab2

Please sign in to comment.