oh-my-git icon indicating copy to clipboard operation
oh-my-git copied to clipboard

Merge - Contradictions - not solvable with --no-ff

Open Gerrit-K opened this issue 3 years ago • 2 comments

I'm used to do merges with --no-ff, but it seems that it is not accepted as a solution in "Merge - Contradictions":

image

Gerrit-K avatar Apr 02 '21 09:04 Gerrit-K

Ah, which commands did you use before the one visible in the screenshot?

The level's win condition is pretty basic here, and just checks that the first parent's grandparent is the same one as the second parent's :D

git rev-parse main^ && test "$(git rev-parse main^1^^)" = "$(git rev-parse main^2^^)"

Depending on how you wanna solve this, we might need to make this more flexible.

blinry avatar Apr 12 '21 14:04 blinry

Ah, which commands did you use before the one visible in the screenshot?

Sorry, forgot to mention that. I believe it was git merge muesli --no-ff and then git merge pancakes.

The level's win condition is pretty basic here, and just checks that the first parent's grandparent is the same one as the second parent's

Ah, then I think I understand what's going on. With --no-ff the "original" muesli branch becomes a secondary parent. In the image above, main^1^2 is the same commit as muesli whereas main^1^1 is the root commit. Thus git rev-parse main^1^^ raises an unknown revision error. Not sure how to cleanly solve this for both solutions off the top of my head though :/

Gerrit-K avatar Apr 12 '21 19:04 Gerrit-K