/**
   * Create a new connection to fetch using the native git transport.
   *
   * @param packTransport the transport.
   */
  public BasePackFetchConnection(final PackTransport packTransport) {
    super(packTransport);

    final FetchConfig cfg = local.getConfig().get(FetchConfig.KEY);
    includeTags = transport.getTagOpt() != TagOpt.NO_TAGS;
    thinPack = transport.isFetchThin();
    allowOfsDelta = cfg.allowOfsDelta;

    walk = new RevWalk(local);
    reachableCommits = new RevCommitList<RevCommit>();
    REACHABLE = walk.newFlag("REACHABLE");
    COMMON = walk.newFlag("COMMON");
    STATE = walk.newFlag("STATE");
    ADVERTISED = walk.newFlag("ADVERTISED");

    walk.carry(COMMON);
    walk.carry(REACHABLE);
    walk.carry(ADVERTISED);
  }
Beispiel #2
0
  private void initRevPool(boolean reverse) {
    if (queue != null) throw new IllegalStateException();

    if (revPool != null) revPool.release();

    if (reverse) revPool = new ReverseWalk(getRepository());
    else revPool = new RevWalk(getRepository());

    revPool.setRetainBody(true);
    SEEN = revPool.newFlag("SEEN"); // $NON-NLS-1$
    reader = revPool.getObjectReader();
    treeWalk = new TreeWalk(reader);
    treeWalk.setRecursive(true);
  }
 GenerateHistoryJob(
     final GitHistoryPage ghp, Control control, RevWalk walk, ResourceManager resources) {
   super(
       NLS.bind(
           UIText.HistoryPage_refreshJob,
           Activator.getDefault()
               .getRepositoryUtil()
               .getRepositoryName(ghp.getInputInternal().getRepository())));
   page = ghp;
   this.walk = walk;
   highlightFlag = walk.newFlag("highlight"); // $NON-NLS-1$
   loadedCommits = new SWTCommitList(control, resources);
   loadedCommits.source(walk);
   trace = GitTraceLocation.HISTORYVIEW.isActive();
 }
Beispiel #4
0
 /**
  * Allocate a new RevFlag for use by the caller.
  *
  * @param name unique name of the flag in the blame context.
  * @return the newly allocated flag.
  * @since 3.4
  */
 public RevFlag newFlag(String name) {
   return revPool.newFlag(name);
 }