diff options
author | James Moger <james.moger@gitblit.com> | 2013-09-18 11:21:33 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2013-09-18 11:31:01 -0400 |
commit | 8a47deaba26f931b753773388007395edd02e266 (patch) | |
tree | 851f15ca2aeee2a170ffdb395180603254a144ef /src/main | |
parent | 67b82a67335cc24b3cadf3e31de097b21294b244 (diff) | |
download | gitblit-8a47deaba26f931b753773388007395edd02e266.tar.gz gitblit-8a47deaba26f931b753773388007395edd02e266.zip |
Improve the rendering of the branch graph for summary page
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/com/gitblit/BranchGraphServlet.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/com/gitblit/BranchGraphServlet.java b/src/main/java/com/gitblit/BranchGraphServlet.java index 8fca4556..95be6132 100644 --- a/src/main/java/com/gitblit/BranchGraphServlet.java +++ b/src/main/java/com/gitblit/BranchGraphServlet.java @@ -137,10 +137,11 @@ public class BranchGraphServlet extends HttpServlet { // default to the items-per-page setting, unless specified
int maxCommits = GitBlit.getInteger(Keys.web.itemsPerPage, 50);
+ int requestedCommits = maxCommits;
if (!StringUtils.isEmpty(length)) {
int l = Integer.parseInt(length);
if (l > 0) {
- maxCommits = l;
+ requestedCommits = l;
}
}
@@ -148,11 +149,11 @@ public class BranchGraphServlet extends HttpServlet { // commit displayed *likely* has correct lane assignments
CommitList commitList = new CommitList();
commitList.source(rw);
- commitList.fillTo(2*maxCommits);
+ commitList.fillTo(2*Math.max(requestedCommits, maxCommits));
// determine the appropriate width for the image
int numLanes = 0;
- int numCommits = Math.min(maxCommits, commitList.size());
+ int numCommits = Math.min(requestedCommits, commitList.size());
for (int i = 0; i < numCommits; i++) {
PlotCommit<Lane> commit = commitList.get(i);
int pos = commit.getLane().getPosition();
|