Skip to content

history_idx: do not visit a parent more than once #183

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

Merged
merged 2 commits into from
Mar 16, 2018
Merged

history_idx: do not visit a parent more than once #183

merged 2 commits into from
Mar 16, 2018

Conversation

jfontan
Copy link
Contributor

@jfontan jfontan commented Mar 16, 2018

There are cases where it can enter a cycle

There are cases where it can enter a cycle

Signed-off-by: Javi Fontan <jfontan@gmail.com>
Copy link
Contributor

@erizocosmico erizocosmico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, the two comments are more of a nitpick 😛

newParents := make([]plumbing.Hash, 0, c.NumParents())
for _, h = range c.ParentHashes {
_, ok = visitedHashes[h]
if !ok {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can inline that as if _, ok := visitedHashes[h]; !ok

c, err := repo.CommitObject(frame.hashes[frame.pos])
h := frame.hashes[frame.pos]
_, ok := visitedHashes[h]
if !ok {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can inline that as if _, ok := visitedHashes[h]; !ok

Signed-off-by: Javi Fontan <jfontan@gmail.com>
@ajnavarro
Copy link
Contributor

The go-mysql-server broke API comp. We need another PR implementing String method and rebase here.

@erizocosmico
Copy link
Contributor

Travis was failing because you were caught in the middle of making it compatible with the new go-mysql-server. Restarted the build.

@jfontan jfontan merged commit 10826a3 into src-d:master Mar 16, 2018
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

Successfully merging this pull request may close these issues.

4 participants