commit | c63c059c4f7f01d2a4d2133c75790b0dc38a1693 | [log] [tgz] |
---|---|---|
author | Jonathan Nieder <jrn@google.com> | Thu Mar 07 14:40:49 2019 -0800 |
committer | Jonathan Nieder <jrn@google.com> | Thu Mar 07 14:40:49 2019 -0800 |
tree | d2d64a783b8905266c5e84840ef8197484c6c152 | |
parent | 174e1113e2709a02b6e6ae30812ae2754ccc7e86 [diff] |
Do not retain body in RevisionParser walk Among other steps, this walk is used for a visibility check, so the cumulative size of the commit content retained can be large. Change-Id: Ia58cea7d355b569b5a6aa2ddbe459cff51180df6
diff --git a/java/com/google/gitiles/RevisionParser.java b/java/com/google/gitiles/RevisionParser.java index 9b2d044..89311a3 100644 --- a/java/com/google/gitiles/RevisionParser.java +++ b/java/com/google/gitiles/RevisionParser.java
@@ -108,6 +108,8 @@ path = path.substring(1); } try (RevWalk walk = new RevWalk(repo)) { + walk.setRetainBody(false); + Revision oldRevision = null; StringBuilder b = new StringBuilder();