GitChangeUtils.showDiff: correct the order of revisions for Changes parsing.

This commit is contained in:
Kirill Likhodedov
2012-07-26 15:33:02 +04:00
parent 5c26f7865b
commit c7fb458fc2
2 changed files with 2 additions and 2 deletions
@@ -405,7 +405,7 @@ public final class GitBranchOperationsProcessor {
@NotNull
private static Collection<Change> loadTotalDiff(@NotNull GitRepository repository, @NotNull String branchName) {
try {
return GitChangeUtils.getDiff(repository.getProject(), repository.getRoot(), null, branchName, null);
return GitChangeUtils.getDiff(repository.getProject(), repository.getRoot(), "HEAD", branchName, null);
}
catch (VcsException e) {
// we treat it as critical and report an error
@@ -419,7 +419,7 @@ public class GitChangeUtils {
String range = firstRevision == null ? nextRevision : firstRevision + ".." + nextRevision;
String output = getDiffOutput(project, root, range, dirtyPaths);
GitRevisionNumber thisRevision = firstRevision == null ? null : loadRevision(project, root, firstRevision);
parseChanges(project, root, thisRevision, loadRevision(project, root, nextRevision), output, changes, Collections.<String>emptySet());
parseChanges(project, root, loadRevision(project, root, nextRevision), thisRevision, output, changes, Collections.<String>emptySet());
return changes;
}