diff options
author | James Moger <james.moger@gitblit.com> | 2011-12-23 08:18:16 -0500 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2011-12-23 08:18:16 -0500 |
commit | 5386a2be537303e68d27bdaa4d9c62c09493c654 (patch) | |
tree | 4e669c6b75b9e9ceb23ab20a83b901b220b19c6e /src/com/gitblit/utils/JGitUtils.java | |
parent | 02e0f7ab18f139fc1923d397da927bcc03c63d95 (diff) | |
download | gitblit-5386a2be537303e68d27bdaa4d9c62c09493c654.tar.gz gitblit-5386a2be537303e68d27bdaa4d9c62c09493c654.zip |
Fixed revlog where start of range is the zeroId
Diffstat (limited to 'src/com/gitblit/utils/JGitUtils.java')
-rw-r--r-- | src/com/gitblit/utils/JGitUtils.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/gitblit/utils/JGitUtils.java b/src/com/gitblit/utils/JGitUtils.java index e73ee800..d694ee28 100644 --- a/src/com/gitblit/utils/JGitUtils.java +++ b/src/com/gitblit/utils/JGitUtils.java @@ -1001,7 +1001,14 @@ public class JGitUtils { RevWalk rw = new RevWalk(repository);
rw.markStart(rw.parseCommit(endRange));
- rw.markUninteresting(rw.parseCommit(startRange));
+ if (startRange.equals(ObjectId.zeroId())) {
+ // maybe this is a tag or an orphan branch
+ list.add(rw.parseCommit(endRange));
+ rw.dispose();
+ return list;
+ } else {
+ rw.markUninteresting(rw.parseCommit(startRange));
+ }
Iterable<RevCommit> revlog = rw;
for (RevCommit rev : revlog) {
|