Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commit can have no branch? #123

Open
ttben opened this issue Jan 23, 2018 · 2 comments
Open

Commit can have no branch? #123

ttben opened this issue Jan 23, 2018 · 2 comments

Comments

@ttben
Copy link
Contributor

ttben commented Jan 23, 2018

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

@mauricioaniche
Copy link
Owner

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

@mauricioaniche
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants