private Ref toRemote(Ref localRef) { Optional<String> remoteName = remote.mapToLocal(localRef.getName()); Preconditions.checkArgument(remoteName.isPresent(), "Can't map %s to remote ref using %s", localRef.getName(), remote.getFetchSpec()); Ref remoteRef; if (localRef instanceof SymRef) { Ref target = toRemote(localRef.peel()); remoteRef = new SymRef(remoteName.get(), target); } else { remoteRef = new Ref(remoteName.get(), localRef.getObjectId()); } return remoteRef; }
.filter(r -> remoteConfig.mapToLocal(r.getName()).isPresent()) .collect(Collectors.toSet());
java.util.Optional<String> localName = remote.mapToLocal(remoteRef.getName()); boolean isNew = false, remoteDeleted = false; if (localName.isPresent()) {