title: What is the fastest way to check recursively for changes in a Git working copy with jgit?
body: <p>I need to check a part of a Git working copy for changes (recursively), including untracked files. This is what I am using so far:</p>
  
  <pre><code>public Status getStatus(String[] paths) throws NoWorkTreeException, GitAPIException {
      StatusCommand cmd = git.status();
      Arrays.asList(paths).forEach((p) -&gt; {
          if (!p.isEmpty()) {
              cmd.addPath(p);
          }
      });
      return cmd.call();
  }
  </code></pre>
  
  <p>and then I check the returned status using</p>
  
  <pre><code>public isModifed(Status status) {
      return (status.hasUncommittedChanges() ||
          status.getUntracked().isEmpty() ||
          status.getUntrackedFolders().isEmpty());
  }
  </code></pre>
  
  <p>What I want to know is: Is there a faster way to do this?</p>