Skip to content

Commit

Permalink
Fixing infinite loop in GitRepo
Browse files Browse the repository at this point in the history
 * Found in 1.19
  at se.bjurr.gitchangelog.internal.git.GitRepo.toString(GitRepo.java:208)
  at se.bjurr.gitchangelog.internal.git.GitRepo.getRef(GitRepo.java:174)
  at se.bjurr.gitchangelog.internal.git.GitRepo.firstCommit(GitRepo.java:195)
  at se.bjurr.gitchangelog.internal.git.GitRepo.toString(GitRepo.java:208)
  at se.bjurr.gitchangelog.internal.git.GitRepo.getRef(GitRepo.java:174)
  • Loading branch information
tomasbjerre committed Mar 15, 2016
1 parent 93be8c4 commit a4a1509
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,26 @@ Changelog of Git Changelog.
## Next release
### Other changes

**Fixing infinite loop in GitRepo**

* Found in 1.19
* at se.bjurr.gitchangelog.internal.git.GitRepo.toString(GitRepo.java:208)
* at se.bjurr.gitchangelog.internal.git.GitRepo.getRef(GitRepo.java:174)
* at se.bjurr.gitchangelog.internal.git.GitRepo.firstCommit(GitRepo.java:195)
* at se.bjurr.gitchangelog.internal.git.GitRepo.toString(GitRepo.java:208)
* at se.bjurr.gitchangelog.internal.git.GitRepo.getRef(GitRepo.java:174)

[f5b6360a4ad9416](https://github.com/tomasbjerre/git-changelog-lib/commit/f5b6360a4ad9416) Tomas Bjerre *2016-03-15 20:25:52*


## 1.35
### Other changes

**Using okhttp 2.7.5 was using 2.3.0**

* Which caused ClassNotFoundException for okio/ForwardingTimeout.

[5e41c6e50d39c39](https://github.com/tomasbjerre/git-changelog-lib/commit/5e41c6e50d39c39) Tomas Bjerre *2016-03-15 20:10:29*
[a4bb6103886b293](https://github.com/tomasbjerre/git-changelog-lib/commit/a4bb6103886b293) Tomas Bjerre *2016-03-15 20:12:47*


## 1.34
Expand Down
11 changes: 1 addition & 10 deletions src/main/java/se/bjurr/gitchangelog/internal/git/GitRepo.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package se.bjurr.gitchangelog.internal.git;

import static com.google.common.base.Objects.firstNonNull;
import static com.google.common.collect.Iterables.transform;
import static com.google.common.collect.Iterators.getLast;
import static com.google.common.collect.Lists.newArrayList;
Expand Down Expand Up @@ -211,14 +210,6 @@ private RevCommit firstCommit() {

@Override
public String toString() {
String s = ""//
+ "First commit at: " + firstCommit().name() + "\n"//
+ "Refs: \n";
Map<String, Ref> allRefs = getAllRefs();
for (String k : allRefs.keySet()) {
ObjectId pealed = firstNonNull(allRefs.get(k).getPeeledObjectId(), pealed = allRefs.get(k).getObjectId());
s += "Ref: " + k + " -> " + pealed.name() + "\n";
}
return s;
return "First commit at: " + firstCommit().name() + " Repo: " + repository;
}
}

0 comments on commit a4a1509

Please # to comment.