summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/gitblit/utils/DiffUtils.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/com/gitblit/utils/DiffUtils.java b/src/main/java/com/gitblit/utils/DiffUtils.java
index b49497e7..dd2a7807 100644
--- a/src/main/java/com/gitblit/utils/DiffUtils.java
+++ b/src/main/java/com/gitblit/utils/DiffUtils.java
@@ -363,19 +363,19 @@ public class DiffUtils {
public static DiffStat getDiffStat(Repository repository, String base, String tip) {
RevCommit baseCommit = null;
RevCommit tipCommit = null;
- RevWalk revWalk = null;
+ RevWalk revWalk = new RevWalk(repository);
try {
- revWalk = new RevWalk(repository);
tipCommit = revWalk.parseCommit(repository.resolve(tip));
if (!StringUtils.isEmpty(base)) {
baseCommit = revWalk.parseCommit(repository.resolve(base));
}
+ return getDiffStat(repository, baseCommit, tipCommit, null);
} catch (Exception e) {
LOGGER.error("failed to generate diffstat!", e);
} finally {
revWalk.dispose();
}
- return getDiffStat(repository, baseCommit, tipCommit, null);
+ return null;
}
public static DiffStat getDiffStat(Repository repository, RevCommit commit) {