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

WIP: Fix merge --no-ff #98

Open
wants to merge 2 commits into
base: gh-pages
Choose a base branch
from

Conversation

IanLee1521
Copy link
Contributor

Work in progress at fixing #83

So far I have fixed the short case, but broken the previous working case...

@hollenberry
Copy link

👋 @IanLee1521 ! Any luck with this since your last update? Just ran into the same bug myself while working on a demo.

@IanLee1521
Copy link
Contributor Author

I haven't, not, but I need to circle back and resolve this and a few other issues. Would be happy to take help over at: https://github.com/ianlee1521/visualizing-git/tree/gh-83-merge-no-ff to try to get to a final working PR though!

@@ -1416,15 +1416,21 @@ define(['d3'], function() {
throw new Error('Already up-to-date.');
} else if (noFF === true) {
var branchStartCommit = this.getCommit(mergeTarget.parent);
Copy link

@udovicic udovicic Nov 10, 2018

Choose a reason for hiding this comment

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

Changing this, and following lines with:

var branchStartCommit = this.getCommit(mergeTarget.id);
var base = (currentCommit.isNoFFCommit === true) ? currentCommit.parent2 : null;

while (branchStartCommit.parent !== base && branchStartCommit.parent !== currentCommit.id) {
  branchStartCommit = this.getCommit(branchStartCommit.parent);
}

will fix several issues, but unfortunately still does not work as expected in some edge cases. Hope this helps

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

3 participants