if (list) {
final Context geogig = this.getCommandLocator(context);
final List<Ref> localBranches = geogig.command(BranchListOp.class).call();
final List<Ref> remoteBranches;
if (remotes) {
remoteBranches = geogig.command(BranchListOp.class).setLocal(false)
.setRemotes(remotes).call();
} else {
remoteBranches = Lists.newLinkedList();
}
context.setResponseContent(new CommandResponse() {