repodriller icon indicating copy to clipboard operation
repodriller copied to clipboard

Commit can have no branch?

Open ttben opened this issue 7 years ago • 2 comments

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 ^^"

ttben avatar Jan 23 '18 15:01 ttben

Thanks, @ttben! I'll debug it asap.

mauricioaniche avatar Jan 23 '18 17:01 mauricioaniche

@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.

mauricioaniche avatar Feb 18 '18 21:02 mauricioaniche