Package org.eclipse.jgit.lib

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


      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

      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

            return null;
          } else {
            ObjectReader reader = rp.getRevWalk().getObjectReader();
            StringBuilder msg = new StringBuilder();
            msg.append("(W) ");
            msg.append(reader.abbreviate(c).name());
            msg.append(":");
            msg.append(" no files changed");
            if (!authorEq) {
              msg.append(", author changed");
            }
View Full Code Here

  private void warnMalformedMessage(RevCommit c) {
    ObjectReader reader = rp.getRevWalk().getObjectReader();
    if (65 < c.getShortMessage().length()) {
      AbbreviatedObjectId id;
      try {
        id = reader.abbreviate(c);
      } catch (IOException err) {
        id = c.abbreviate(6);
      }
      addMessage("(W) " + id.name() //
          + ": commit subject >65 characters; use shorter first paragraph");
View Full Code Here

    }

    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

      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

      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

      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

            + " 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

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.