git-gud icon indicating copy to clipboard operation
git-gud copied to clipboard

Level: The Truth

Open benthayer opened this issue 5 years ago • 6 comments

fixes #262

I changed the layout of the level so you have to detach HEAD, which will be the first time the user has done so. This makes the existing rampup detaching obsolete (and removed), which is fine because the explanation is weaved into this level.

Explanation is obviously incredibly long, but I'm not sure how much it can be shortened without reducing content. It might be worth splitting up the level? I think user tests (post-merge) would be the best.

Also, there are files from the easy level there, but that's how this level was started, and we don't want git to think they got removed, so that's fine.

benthayer avatar Aug 10 '20 08:08 benthayer

@sahansk2 How do you like the level?

benthayer avatar Aug 10 '20 08:08 benthayer

Level looks pretty good! I was just thinking that maybe we should output

Run git gud explain for more details.

at the end of the goal text when the level is loaded. I actually tried to go about this level without running git gud explain, but that might be because I'm not used to running git gud explain. :v

I'm making a proper review right now, but it's just this comment for now.

I'm guessing that this level isn't complete yet, right? Running through the level (without running git gud explain, this is what I did):

sahan@sahan-Lenovo-YOGA-C930-ubuntu:test$ git gud load 6
Just like last level, make the log messages form the sentence "This is an easy level"
This time, instead of rebasing, detach HEAD using git checkout then use git cherry-pick.
Save your changes on a new branch named whatever you want, but don't check it out.

<<<<<<< Simulating: git log --reverse --oneline
550efb4 This
591377c easy
7440f56 an
af1bdca is
c529d67 (HEAD -> master) level
=======
sahan@sahan-Lenovo-YOGA-C930-ubuntu:test$ git checkout 550e
Note: switching to '550e'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 550efb4 This
sahan@sahan-Lenovo-YOGA-C930-ubuntu:test$ git switch -c complete
Switched to a new branch 'complete'
sahan@sahan-Lenovo-YOGA-C930-ubuntu:test$ git cherry-pick af1b
[complete c78ec41] is
 Author: Git Gud <[email protected]>
 Date: Tue Aug 11 11:49:20 2020 -0400
 1 file changed, 1 insertion(+)
 create mode 100644 2.txt
sahan@sahan-Lenovo-YOGA-C930-ubuntu:test$ git cherry-pick 7440f
[complete fe1eca7] an
 Author: Git Gud <[email protected]>
 Date: Tue Aug 11 11:49:19 2020 -0400
 1 file changed, 1 insertion(+)
 create mode 100644 3.txt
sahan@sahan-Lenovo-YOGA-C930-ubuntu:test$ git cherry-pick 7440
On branch complete
You are currently cherry-picking commit 7440f56.
  (all conflicts fixed: run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

nothing to commit, working tree clean
The previous cherry-pick is now empty, possibly due to conflict resolution.
If you wish to commit it anyway, use:

    git commit --allow-empty

Otherwise, please use 'git cherry-pick --skip'
sahan@sahan-Lenovo-YOGA-C930-ubuntu:test$ git commit --allow-empty
/usr/bin/python3: No module named gitgud.hooks.precommit

sahansk2 avatar Aug 11 '20 16:08 sahansk2

Just pushed. I'm thinking that it's not worth running git gud show-tree or git gud explain because they'll already be accustomed to running git gud explain, and git gud show-tree isn't specifically useful for this level. They can just run git log and get the same information. We can always see what the users say after we merge

benthayer avatar Aug 12 '20 22:08 benthayer

@sahansk2 Can you review this again?

benthayer avatar Aug 12 '20 22:08 benthayer

The description of the level doesn't match the testing. I don't believe we check to see if another branch is created

benthayer avatar Aug 15 '20 02:08 benthayer

@sahansk2 I'm gonna throw the ball in your court here since I made updates after your comment

benthayer avatar Apr 13 '21 19:04 benthayer