repodriller
repodriller copied to clipboard
Commit can have no branch?
I was able to wrap everything here.
Just import it in your favorite IDE, unzip the repo (which is a fresh git clone
) and run the main class. I had to attach a zip of the repo instead of doing a GitRemoteRepository
object because the behavior is not the same when taking a local repo and using aGitRemoteRepository
..
... but this is another problem ^^"
Thanks, @ttben! I'll debug it asap.
@ttben , I just tried to debug it on the same ExoPlayer project, but it does not find a commit without a branch here.
Just to make sure we are doing the same thing, that's my test:
new RepositoryMining()
.in(GitRepository.singleProject("/Users/mauricioaniche/workspace/ExoPlayer"))
.through(Commits.all())
.collect(new CollectConfiguration().branches())
.process((repo, commit, writer) -> {
commits.add(commit.getHash());
if (commit.isMerge()) {
merge.add(commit.getHash());
if (commit.getBranches().isEmpty()) {
all.add(commit.getHash());
}
}
})
.mine();
Can you tell me the commit hashes that fail for you?
On the other hand, I figured out why RepoDriller sometimes shows more commits than Git Log does. I'll submit a PR right away.