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

Simplify nearest_branch algorithm #1167

Merged
merged 1 commit into from
Oct 24, 2019

Conversation

kaste
Copy link
Collaborator

@kaste kaste commented Sep 24, 2019

Closes #1166

This is the 'cheap' solution mentioned in #1166. We just take the first relative. By that we go from minimal 4 git commands down to 1.

@randy3k
Copy link
Collaborator

randy3k commented Sep 24, 2019

It kind of makes sense to me.
@asfaltboy what do you think? You were the one who wrote it.

@stoivo
Copy link
Member

stoivo commented Sep 24, 2019

I did't touch rebase much, so up to you guys

@kaste
Copy link
Collaborator Author

kaste commented Sep 24, 2019

git show-branch also has sorting options. Maybe it is enough to fiddle with them if we run into problems. After all we only want a good candidate, as explained in the issue there are valid other candidates but then we must open a panel and ask the user.

@kaste
Copy link
Collaborator Author

kaste commented Sep 25, 2019

I actually don't use the rebase dashboard at all but wanted to use the 'nearest_branch' algo for something else.

@asfaltboy
Copy link
Member

I think @kaste is right, we had originally considered picking nearest neighbour and be done with it, but then we saw some issues with many similar forked branches (see discussion starting around this comment).

Apparently, we complicated matters trying to find an earlier common node. In hindsight, we probably should have introduced these two methods separately to have time to test. I have no objection to merging this fix, as it fixes some issues I've been seeing and from my (limited) testing seems to work in all scenarios mentioned.

@kaste kaste merged commit 50b748a into timbrel:dev Oct 24, 2019
@kaste kaste deleted the simplify-rebase-base-candidate branch October 24, 2019 20:00
@kaste
Copy link
Collaborator Author

kaste commented Oct 24, 2019

So, let's try this on dev.

@kaste kaste mentioned this pull request Oct 24, 2019
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.

None yet

4 participants