private Remote resolveRemote(String remoteName) { Optional<Remote> pushRemote = command(RemoteResolve.class).setName(remoteName).call(); checkArgument(pushRemote.isPresent(), "Remote could not be resolved."); return pushRemote.get(); }
private Remote resolveRemote(String remoteName) { Optional<Remote> pushRemote = command(RemoteResolve.class).setName(remoteName).call(); checkArgument(pushRemote.isPresent(), "Remote could not be resolved."); return pushRemote.get(); }
private ImmutableSet<Ref> getLocalRefs() { Predicate<Ref> filter = new Predicate<Ref>() { final String prefix = Ref.HEADS_PREFIX; @Override public boolean apply(Ref input) { return !(input instanceof SymRef) && input.getName().startsWith(prefix); } }; ImmutableSet<Ref> localRefs = command(ForEachRef.class).setFilter(filter).call(); return localRefs; }
private boolean isShallow(Remote remote) { try (IRemoteRepo repo = command(OpenRemote.class).setRemote(remote).call()) { Integer depth = repo.getDepth().or(0); if (depth.intValue() > 0) { return true; } } return false; }
private ImmutableSet<Ref> getLocalRefs() { Predicate<Ref> filter = new Predicate<Ref>() { final String prefix = Ref.HEADS_PREFIX; @Override public boolean apply(Ref input) { return !(input instanceof SymRef) && input.getName().startsWith(prefix); } }; ImmutableSet<Ref> localRefs = command(ForEachRef.class).setFilter(filter).call(); return localRefs; }
private boolean isShallow(Remote remote) { try (IRemoteRepo repo = command(OpenRemote.class).setRemote(remote).call()) { Integer depth = repo.getDepth().or(0); if (depth.intValue() > 0) { return true; } } return false; }
private Optional<Ref> refParse(String refSpec) { return command(RefParse.class).setName(refSpec).call(); }
private Optional<Ref> refParse(String refSpec) { return command(RefParse.class).setName(refSpec).call(); }