git-learning-game / oh-my-git

An interactive Git learning game!
https://ohmygit.org
Other
2.04k stars 146 forks source link

Branch from stash goal condition #141

Open prscoelho opened 2 years ago

prscoelho commented 2 years ago

I noticed that simply dragging the checkout card into one of the stash squares results in the goal condition passing despite there being no new branch.

The culprit is here: https://github.com/git-learning-game/oh-my-git/blob/main/levels/stash/stash-branch#L40 Detached head counts as a line in git branch --list

To reproduce