Package org.eclipse.jgit.generated.storage.dht.proto.GitStore

Examples of org.eclipse.jgit.generated.storage.dht.proto.GitStore.RefData


  private void cachePeeledState(Ref oldLeaf, Ref newLeaf) {
    // TODO(spearce) Use an ExecutorService here
    try {
      RepositoryKey repo = repository.getRepositoryKey();
      RefKey key = RefKey.create(repo, newLeaf.getName());
      RefData oldData = ((DhtRef) oldLeaf).getRefData();
      RefData newData = ((DhtRef) newLeaf).getRefData();
      db.ref().compareAndPut(key, oldData, newData);
    } catch (TimeoutException e) {
      // Ignore a timeout here, we were only trying to update
      // a cached value to save peeling costs in the future.
View Full Code Here


      ref = new DhtObjectIdRef(refName, NONE);
    else
      detachingSymbolicRef = detach && ref.isSymbolic();

    if (detachingSymbolicRef) {
      RefData src = ((DhtRef) ref.getLeaf()).getRefData();
      RefData.Builder b = RefData.newBuilder(ref.getRefData());
      b.clearSymref();
      b.setTarget(src.getTarget());
      ref = new DhtObjectIdRef(refName, b.build());
    }

    RepositoryKey repo = repository.getRepositoryKey();
    DhtRefUpdate update = new DhtRefUpdate(this, repo, db, ref);
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.generated.storage.dht.proto.GitStore.RefData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.