BranchChangeListener.branchHasChanged() received wrong branch name if user created new branch

Answered

I added BranchChangeListener

project.getMessageBus().connect().subscribe(BranchChangeListener.VCS_BRANCH_CHANGED, new DmBranchChangeListener(project));
public class DmBranchChangeListener implements BranchChangeListener {
/*some code*/
@Override
public void branchHasChanged(@NotNull String branchName) {
/*some code*/
}
}

 but when the user adds a new branch with checkout, the listener gets the branch name "HEAD" instead of the new branch name

IC-211.7142

0

Please sign in to leave a comment.