]> source.dussan.org Git - gitblit.git/commitdiff
Fixed IndexOutOfBoundsException that occurs when a repository doesn't 3/head
authorBoris Prüßmann <boris@pruessmann.org>
Mon, 2 Jan 2012 10:01:10 +0000 (11:01 +0100)
committerBoris Prüßmann <boris@pruessmann.org>
Mon, 2 Jan 2012 10:01:10 +0000 (11:01 +0100)
have commits within the requested time range.

src/com/gitblit/utils/ActivityUtils.java

index 204fe3c32e6c61dacc1a2e08fe3cd53d25326920..d6afd93c90c0eb9fcd331f6bb8712fd7bb18dd39 100644 (file)
@@ -85,7 +85,7 @@ public class ActivityUtils {
 \r
                                // determine commit branch\r
                                String branch = objectId;\r
-                               if (StringUtils.isEmpty(branch)) {\r
+                               if (StringUtils.isEmpty(branch) && !commits.isEmpty()) {\r
                                        List<RefModel> headRefs = allRefs.get(commits.get(0).getId());\r
                                        List<String> localBranches = new ArrayList<String>();\r
                                        for (RefModel ref : headRefs) {\r