Examples of abbreviate()


Examples of org.eclipse.jgit.lib.ObjectReader.abbreviate()

    }

    if (0 < longLineCnt && 33 < longLineCnt * 100 / nonEmptyCnt) {
      AbbreviatedObjectId id;
      try {
        id = reader.abbreviate(c);
      } catch (IOException err) {
        id = c.abbreviate(6);
      }
      addMessage("(W) " + id.name() //
          + ": commit message lines >70 characters; manually wrap lines");
View Full Code Here

Examples of org.eclipse.jgit.lib.ObjectReader.abbreviate()

      TreeWalk tw = new TreeWalk(or);
      tw.setFilter(TreeFilter.ANY_DIFF);
      tw.setRecursive(true);

      ObjectId start = db.resolve(Constants.HEAD);
      startId = or.abbreviate(start);
      rw.markStart(rw.parseCommit(start));
      for (;;) {
        final RevCommit c = rw.next();
        if (c == null)
          break;
View Full Code Here

Examples of org.eclipse.jgit.lib.ObjectReader.abbreviate()

      ObjectReader reader = walk.getObjectReader();
      for (RevCommit commit : cherryPickList) {
        sb.setLength(0);
        sb.append(Action.PICK.toToken());
        sb.append(" ");
        sb.append(reader.abbreviate(commit).name());
        sb.append(" ");
        sb.append(commit.getShortMessage());
        fw.write(sb.toString());
        fw.newLine();
      }
View Full Code Here

Examples of org.eclipse.jgit.lib.ObjectReader.abbreviate()

      ObjectReader reader = walk.getObjectReader();
      for (RevCommit commit : cherryPickList) {
        sb.setLength(0);
        sb.append(Action.PICK.toToken());
        sb.append(" ");
        sb.append(reader.abbreviate(commit).name());
        sb.append(" ");
        sb.append(commit.getShortMessage());
        fw.write(sb.toString());
        fw.newLine();
      }
View Full Code Here

Examples of org.eclipse.jgit.lib.ObjectReader.abbreviate()

            + " onto " + upstreamCommit.name())); //$NON-NLS-1$
    // determine the commits to be applied
    List<RevCommit> cherryPickList = calculatePickList(headCommit);
    ObjectReader reader = walk.getObjectReader();
    for (RevCommit commit : cherryPickList)
      toDoSteps.add(new RebaseTodoLine(Action.PICK, reader
          .abbreviate(commit), commit.getShortMessage()));
    repo.writeRebaseTodoFile(rebaseState.getPath(GIT_REBASE_TODO),
        toDoSteps, false);

    monitor.endTask();
View Full Code Here

Examples of org.eclipse.jgit.lib.ObjectReader.abbreviate()

      TreeWalk tw = new TreeWalk(or);
      tw.setFilter(TreeFilter.ANY_DIFF);
      tw.setRecursive(true);

      ObjectId start = db.resolve(Constants.HEAD);
      startId = or.abbreviate(start);
      rw.markStart(rw.parseCommit(start));
      for (;;) {
        final RevCommit c = rw.next();
        if (c == null)
          break;
View Full Code Here

Examples of org.eclipse.jgit.lib.ObjectReader.abbreviate()

      ObjectReader reader = walk.getObjectReader();
      for (RevCommit commit : cherryPickList) {
        sb.setLength(0);
        sb.append(Action.PICK.toToken());
        sb.append(" ");
        sb.append(reader.abbreviate(commit).name());
        sb.append(" ");
        sb.append(commit.getShortMessage());
        fw.write(sb.toString());
        fw.newLine();
      }
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevBlob.abbreviate()

    RevBlob id = test.blob("test");
    test.branch("master").commit().add("test", id).child();
    test.packAndPrune();
    assertTrue(reader.has(id));

    assertEquals(id.abbreviate(7), reader.abbreviate(id, 7));
    assertEquals(id.abbreviate(8), reader.abbreviate(id, 8));
    assertEquals(id.abbreviate(10), reader.abbreviate(id, 10));
    assertEquals(id.abbreviate(16), reader.abbreviate(id, 16));

    Collection<ObjectId> matches = reader.resolve(reader.abbreviate(id, 8));
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevBlob.abbreviate()

    test.branch("master").commit().add("test", id).child();
    test.packAndPrune();
    assertTrue(reader.has(id));

    assertEquals(id.abbreviate(7), reader.abbreviate(id, 7));
    assertEquals(id.abbreviate(8), reader.abbreviate(id, 8));
    assertEquals(id.abbreviate(10), reader.abbreviate(id, 10));
    assertEquals(id.abbreviate(16), reader.abbreviate(id, 16));

    Collection<ObjectId> matches = reader.resolve(reader.abbreviate(id, 8));
    assertNotNull(matches);
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevBlob.abbreviate()

    test.packAndPrune();
    assertTrue(reader.has(id));

    assertEquals(id.abbreviate(7), reader.abbreviate(id, 7));
    assertEquals(id.abbreviate(8), reader.abbreviate(id, 8));
    assertEquals(id.abbreviate(10), reader.abbreviate(id, 10));
    assertEquals(id.abbreviate(16), reader.abbreviate(id, 16));

    Collection<ObjectId> matches = reader.resolve(reader.abbreviate(id, 8));
    assertNotNull(matches);
    assertEquals(1, matches.size());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.