Skip to content

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.

3 participants