congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
PullResult.getNewRef
Code IndexAdd Tabnine to your IDE (free)

How to use
getNewRef
method
in
org.locationtech.geogig.remotes.PullResult

Best Java code snippets using org.locationtech.geogig.remotes.PullResult.getNewRef (Showing top 7 results out of 315)

origin: locationtech/geogig

private boolean isNothingToCommit(PullResult pullResult) {
  return pullResult.getNewRef().equals(pullResult.getOldRef());
}
origin: org.locationtech.geogig/geogig-web-api

  private AutoCloseableIterator<DiffEntry> resolveDiff(Context geogig, PullResult result) {
    AutoCloseableIterator<DiffEntry> iter;
    if (result.getOldRef() != null && result.getOldRef().equals(result.getNewRef())) {
      iter = null;
    } else {
      if (result.getOldRef() == null) {
        iter = geogig.command(DiffOp.class).setNewVersion(result.getNewRef().getObjectId())
            .setOldVersion(ObjectId.NULL).call();
      } else {
        iter = geogig.command(DiffOp.class).setNewVersion(result.getNewRef().getObjectId())
            .setOldVersion(result.getOldRef().getObjectId()).call();
      }
    }
    return iter;
  }
}
origin: org.locationtech.geogig/geogig-web-api

if (iter != null) {
  writeElement("Remote", result.getRemoteName());
  writeElement("Ref", result.getNewRef().localName());
  int added = 0;
  int removed = 0;
origin: org.locationtech.geogig/geogig-cli

final Ref newRef = result.getNewRef();
origin: locationtech/geogig

final Ref newRef = result.getNewRef();
origin: org.locationtech.geogig/geogig-cli-remoting

final Ref newRef = result.getNewRef();
origin: locationtech/geogig

@Test
public void testPullRefspecForce() throws Exception {
  // Add a commit to the remote
  insertAndAdd(remoteGeogig.geogig, lines3);
  RevCommit commit = remoteGeogig.geogig.command(CommitOp.class).call();
  expectedMaster.addFirst(commit);
  // Pull the commit
  PullOp pull = pullOp();
  // fetch remote's master onto new ref refs/remotes/origin/newbranch, then pull from there
  pull.addRefSpec("+master:newbranch");
  PullResult result = pull.setRebase(true).call();
  Optional<Ref> fetchedToRef = getRef(localGeogig.repo, "refs/remotes/origin/newbranch");
  assertTrue(fetchedToRef.isPresent());
  List<RevCommit> logged = log(localGeogig.repo);
  assertEquals(expectedMaster, logged);
  Ref oldRef = result.getOldRef();
  Ref newRef = result.getNewRef();
  assertEquals("refs/heads/master", oldRef.getName());
  assertEquals("refs/heads/master", newRef.getName());
  assertEquals(fetchedToRef.get().getObjectId(), newRef.getObjectId());
}
org.locationtech.geogig.remotesPullResultgetNewRef

Popular methods of PullResult

  • getOldRef
  • getFetchResult
  • getRemoteName
  • getMergeReport
  • <init>
  • setFetchResult
  • setMergeReport
  • setNewRef
  • setOldRef
  • setRemote
  • setRemoteName
  • setRemoteName

Popular in Java

  • Parsing JSON documents to java classes using gson
  • notifyDataSetChanged (ArrayAdapter)
  • requestLocationUpdates (LocationManager)
  • getContentResolver (Context)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now