Closed courajs closed 11 years ago
Alright I figured out how to open and test a specific level, and it looks like the rebase solution is valid. Maybe this should be changed to specify that work has been pushed and rebase isn't an option? It could even require you to push the changes.
@FellowMD The solution ensures that revert has been used. I think simply stating that you should not use rebase because it has been pushed will be sufficient.
The solution actually explicitly accepts either the revert option or the rebase option:
solution do
valid = false
valid = true if repo.commits.length > 3 &&
repo.commits[3].message == "First commit" &&
repo.commits[2].message == "Second commit" &&
repo.commits[1].message == "Bad commit" &&
repo.commits[0].message.split("\n").first == "Revert \"Bad commit\""
valid = true if repo.commits[1].message == "First commit" &&
repo.commits[0].message == "Second commit"
valid
end
Considering there are already a lot of rebase levels, would you want to maybe remove the rebase solution, and make the player push the revert solution to a remote (which already has Bad commit)? I'll make the changes if you'd want that
@FellowMD That is a very good point, I obviously wasn't paying attention when I checked this morning!
Why don't we just remove the second check, so it is only valid if they have used revert
? What advantage would making the player push the solution offer?
Sorry, I was under the impression a rebase might've solved this level. I no longer think that's true after a few experiments, but I also don't really know how to get back to a previous level to check.