Ref currentRef = repo.getRef(branchName);
if (currentRef == null)
continue;
String fullName = currentRef.getName();
if (fullName.equals(currentBranch))
throw new CannotDeleteCurrentBranchException(
MessageFormat
.format(
JGitText.get().cannotDeleteCheckedOutBranch,
branchName));
RefUpdate update = repo.updateRef(fullName);