Skip to content

Commit

Permalink
add support for / in branch names
Browse files Browse the repository at this point in the history
fixes #11

Signed-off-by: Didier Vojtisek <didier.vojtisek@inria.fr>
  • Loading branch information
dvojtise committed Apr 25, 2022
1 parent 25e5dc8 commit d678b83
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,8 @@ public Set<String> collectAllSubmodulesActiveRemoteBranches(int inactivityThresh
logger.info("remote branches in submodule " + walk.getModuleName() + ":");
List<Ref> branches = submodulegit.branchList().setListMode(ListMode.REMOTE).call();
for (Ref branch : branches) {
if (branch.getName().startsWith("refs/remotes")) {
String branchName = branch.getName().substring(branch.getName().lastIndexOf("/") + 1);

if (branch.getName().startsWith("refs/remotes/origin/")) {
String branchName = branch.getName().substring("refs/remotes/origin/".length());
// find branch age
RevWalk walkSubModuleGit = new RevWalk(submodulegit.getRepository());
RevCommit latestCommit = walkSubModuleGit.parseCommit(branch.getObjectId());
Expand Down

0 comments on commit d678b83

Please sign in to comment.