git-machete-intellij-plugin icon indicating copy to clipboard operation
git-machete-intellij-plugin copied to clipboard

Fork point is not correctly inferred after fast forward merge

Open micpiotrowski opened this issue 5 years ago • 4 comments

Step to reproduce:

  1. create sample repo by script form blogpost
  2. rebase build-chain onto parent
  3. do Fast Forward Parent Branch To Match Current Branch action on build-chain Then listed commits from allow-ownership-link will disappear: probably_bug

micpiotrowski avatar Jul 31 '20 14:07 micpiotrowski

The solution would most likely entail skipping the reflogs of merged children of X when finding fork point of X

PawelLipski avatar Oct 12 '20 13:10 PawelLipski

Or maybe even: skipping the reflogs of all merged branches of X when finding fork point of X — so that fork point algorithm doesn't need to know what the children of X are (so far it needs to know what parent of X is, alas... originally it knew nothing about the branch layout completely)

PawelLipski avatar Oct 22 '20 18:10 PawelLipski

A sample repository state where this can be seen: https://drive.google.com/file/d/1Ed2dVcnk3bKORFn1Iv7DycHYMYOnr-k_/view?usp=sharing

image

There's a yellow edge b/w develop and master solely b/c backport/v0.8.0 has been merged to the former... this makes no sense, really :/

PawelLipski avatar Oct 23 '20 08:10 PawelLipski

Whoops... that's not so easy. Specifically, it's not easy to determine which branches are merged to the X (and not just X's ancestors that have never been merged to X) without heavily relying on branch layout... I don't want to further complicate the fork point algorithm unless absolutely necessary.

As a partial light-weight solution, I'd suggest https://github.com/VirtusLab/git-machete-intellij-plugin/issues/633 instead.

PawelLipski avatar Oct 24 '20 16:10 PawelLipski

Yeah, we've got better support for FP overrides in v3.2.0, let's treat that as a permanent workaround. Much better than complicating the FP algorithm even more 😅

PawelLipski avatar Oct 20 '22 12:10 PawelLipski