Package org.eclipse.jgit.transport

Examples of org.eclipse.jgit.transport.TransportBundleStream


  private static String fetchBundle(final Git git, final URI bundle, final String refName) throws IOException {
    final URL loc = bundle.toURL();
    final URIish uri = new URIish(loc);

    final Transport t = new TransportBundleStream(git.getRepository(), uri, loc.openStream());
    try {
      final FetchConnection src = t.openFetch();
      final Ref target = src.getRef(refName);

      final Collection<Ref> want = singleton(target);
      final Set<ObjectId> have = emptySet();
      src.fetch(NullProgressMonitor.INSTANCE, want, have);

      return target.getObjectId().getName();

    } finally {
      t.close();
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.transport.TransportBundleStream

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.