public static @Nullable Collection<Change> getDiffWithWorkingTree(@NotNull GitRepository repository,
                                                          @NotNull @NonNls String refToCompare,
                                                          boolean detectRenames) {
    Collection<Change> changes;
    try {
      changes = getDiffWithWorkingDir(repository.getProject(), repository.getRoot(), refToCompare, null, false, detectRenames);
    }
    catch (VcsException e) {
      LOG.warn("Couldn't collect diff", e);
      changes = null;
    }
    return changes;
  }
public static @Nullable Collection<Change> getDiffWithWorkingTree(@NotNull GitRepository repository,
                                                          @NotNull @NonNls String refToCompare,
                                                          boolean detectRenames)