oh-my-git
oh-my-git copied to clipboard
Merge - Contradictions - not solvable with --no-ff
I'm used to do merges with --no-ff
, but it seems that it is not accepted as a solution in "Merge - Contradictions":
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.
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 :/