Giter VIP home page Giter VIP logo

Comments (4)

courajs avatar courajs commented on August 15, 2024

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.

from githug.

Gazler avatar Gazler commented on August 15, 2024

@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.

from githug.

courajs avatar courajs commented on August 15, 2024

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

from githug.

Gazler avatar Gazler commented on August 15, 2024

@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?

from githug.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.