if (ref.isSymbolic()) {
// A symbolic reference to another branch, instead of
// showing the resolved value, show the name it references.
//
String target = ref.getTarget().getName();
RefControl targetRefControl = pctl.controlForRef(target);
if (!targetRefControl.isVisible()) {
continue;
}
if (target.startsWith(Constants.R_HEADS)) {
target = target.substring(Constants.R_HEADS.length());
}
Branch b = createBranch(ref.getName());
b.setRevision(new RevId(target));
if (Constants.HEAD.equals(ref.getName())) {
b.setCanDelete(false);
headBranch = b;
} else {
b.setCanDelete(targetRefControl.canDelete());
branches.add(b);
}
continue;
}
final RefControl refControl = pctl.controlForRef(ref.getName());
if (refControl.isVisible()) {
if (ref.getName().startsWith(Constants.R_HEADS)) {
branches.add(createBranch(ref, refControl, targets));
} else if (GitRepositoryManager.REF_CONFIG.equals(ref.getName())) {
configBranch = createBranch(ref, refControl, targets);
}