}
final String targetBranch;
if (!(node.getObject() instanceof Ref))
// Use same dialog as for project when a repository is selected
// allowing reset to any commit
return new ResetActionHandler().execute(event);
// If a ref is selected in the repository view, only reset to
// that ref will be possible.
targetBranch = ((Ref) node.getObject()).getName();