if (rename) {
checkParameter(!branchName.isEmpty(), "You must specify a branch to rename.");
if (branchName.size() == 1) {
Optional<Ref> headRef = geogig.command(RefParse.class).setName(Ref.HEAD).call();
geogig.command(BranchRenameOp.class).setNewName(branchName.get(0)).setForce(force)
.call();
if (headRef.isPresent()) {
SymRef ref = (SymRef) headRef.get();
console.println("renamed branch '"
+ ref.getTarget().substring(Ref.HEADS_PREFIX.length()) + "' to '"