Skip to content

Commit 99721ac

Browse files
committed
Fixed IndexOutOfBoundsException that occurs when a repository doesn't
have commits within the requested time range.
1 parent ff148dd commit 99721ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/com/gitblit/utils/ActivityUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public static List<Activity> getRecentActivity(List<RepositoryModel> models, int
8585

8686
// determine commit branch
8787
String branch = objectId;
88-
if (StringUtils.isEmpty(branch)) {
88+
if (StringUtils.isEmpty(branch) && !commits.isEmpty()) {
8989
List<RefModel> headRefs = allRefs.get(commits.get(0).getId());
9090
List<String> localBranches = new ArrayList<String>();
9191
for (RefModel ref : headRefs) {

0 commit comments

Comments
 (0)