Package org.eclipse.jgit.api

Examples of org.eclipse.jgit.api.BlameCommand.call()


        object = repository.resolve(objectId);
      }
      BlameCommand blameCommand = new BlameCommand(repository);
      blameCommand.setFilePath(blobPath);
      blameCommand.setStartCommit(object);
      BlameResult blameResult = blameCommand.call();
      RawText rawText = blameResult.getResultContents();
      int length = rawText.size();
      for (int i = 0; i < length; i++) {
        RevCommit commit = blameResult.getSourceCommit(i);
        AnnotatedLine line = new AnnotatedLine(commit, i + 1, rawText.getString(i));
View Full Code Here


        blameCommand.setStartCommit(blame.getStartCommit());
      }
      BlameResult result;

      try {
        result = blameCommand.call();
      } catch (Exception e1) {
        return;
      }
      if (result != null) {
        blame.clearLines();
View Full Code Here

        .getBoolean(UIPreferences.BLAME_IGNORE_WHITESPACE))
      command.setTextComparator(RawTextComparator.WS_IGNORE_ALL);

    BlameResult result;
    try {
      result = command.call();
    } catch (Exception e1) {
      Activator.error(e1.getMessage(), e1);
      return;
    }
    if (result == null)
View Full Code Here

        BlameCommand blamer = new BlameCommand(repository);
        ObjectId commitID = repository.resolve("HEAD");
        blamer.setStartCommit(commitID);
        blamer.setFilePath("README.md");
        BlameResult blame = blamer.call();

        // read the number of lines from the commit to not look at changes in the working copy
        int lines = countFiles(repository, commitID, "README.md");
        for (int i = 0; i < lines; i++) {
            RevCommit commit = blame.getSourceCommit(i);
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.