]> source.dussan.org Git - gitblit.git/commitdiff
Fixed revlog where start of range is the zeroId
authorJames Moger <james.moger@gitblit.com>
Fri, 23 Dec 2011 13:18:16 +0000 (08:18 -0500)
committerJames Moger <james.moger@gitblit.com>
Fri, 23 Dec 2011 13:18:16 +0000 (08:18 -0500)
src/com/gitblit/utils/JGitUtils.java

index e73ee8009067f6f5647416209e86ccbb8967837b..d694ee289819b2b184a60895f4a8d34bfd5a6fc2 100644 (file)
@@ -1001,7 +1001,14 @@ public class JGitUtils {
 \r
                        RevWalk rw = new RevWalk(repository);\r
                        rw.markStart(rw.parseCommit(endRange));\r
-                       rw.markUninteresting(rw.parseCommit(startRange));\r
+                       if (startRange.equals(ObjectId.zeroId())) {\r
+                               // maybe this is a tag or an orphan branch\r
+                               list.add(rw.parseCommit(endRange));\r
+                               rw.dispose();\r
+                               return list;\r
+                       } else {\r
+                               rw.markUninteresting(rw.parseCommit(startRange));\r
+                       }\r
 \r
                        Iterable<RevCommit> revlog = rw;\r
                        for (RevCommit rev : revlog) {\r