Package org.eclipse.jgit.lib

Examples of org.eclipse.jgit.lib.IndexDiff.diff()


  public Status call() throws IOException, NoWorkTreeException {
    if (workingTreeIt == null)
      workingTreeIt = new FileTreeIterator(repo);

    IndexDiff diff = new IndexDiff(repo, Constants.HEAD, workingTreeIt);
    diff.diff();

    return new Status(diff);
  }

  /**
 
View Full Code Here


    try {
      IndexDiff diff = new IndexDiff(repo, Constants.HEAD, workingTreeIt);
      if (paths != null)
        diff.setFilter(PathFilterGroup.createFromStrings(paths));
      if (progressMonitor == null)
        diff.diff();
      else
        diff.diff(progressMonitor, ProgressMonitor.UNKNOWN,
            ProgressMonitor.UNKNOWN, ""); //$NON-NLS-1$
      return new Status(diff);
    } catch (IOException e) {
View Full Code Here

      if (paths != null)
        diff.setFilter(PathFilterGroup.createFromStrings(paths));
      if (progressMonitor == null)
        diff.diff();
      else
        diff.diff(progressMonitor, ProgressMonitor.UNKNOWN,
            ProgressMonitor.UNKNOWN, ""); //$NON-NLS-1$
      return new Status(diff);
    } catch (IOException e) {
      throw new JGitInternalException(e.getMessage(), e);
    }
View Full Code Here

        Map<File, StatusInfo> files = new HashMap<File, StatusInfo>();

        try {
            index = new IndexDiff(repo);
            index.diff();

            put(index.getAdded(), relPath, files, root,
                    StatusInfo.STATUS_VERSIONED_ADDEDLOCALLY);
            put(index.getRemoved(), relPath, files, root,
                    StatusInfo.STATUS_VERSIONED_REMOVEDLOCALLY);
View Full Code Here

        int status = StatusInfo.STATUS_UNKNOWN;
        String name = getRelative(root, file);

        try {
            index = new IndexDiff(repo);
            index.diff();
        } catch (IOException ex) {
            Exceptions.printStackTrace(ex);
            return new StatusInfo(status, null, false);
        }
View Full Code Here

        Repository repo = Git.getInstance().getRepository(root);
        Map<File, StatusInfo> files = new HashMap<File, StatusInfo>();

        try {
            IndexDiff index = new IndexDiff(repo);
            index.diff();

            put(index.getAdded(), relPath, files, root,
                    StatusInfo.STATUS_VERSIONED_ADDEDLOCALLY);
            put(index.getRemoved(), relPath, files, root,
                    StatusInfo.STATUS_VERSIONED_REMOVEDLOCALLY);
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.