robinedwards/gitfeatures — pull request #7 by sakisv (2013-11-11 18:20:32+00:00)
Title: Feature delete branch from other branch

Ok, so there were 5 cases identified that needed to be taken care of when issuing ``git [feature|hotfix] finish [name]``:

`` current branch -> branch to delete ``
`` a -> b `` --- delete b and stay on a
`` b -> b ``--- checkout master and delete b
``master -> b `` --- delete b and stay on master
`` a -> `` --- checkout master and delete a
`` master -> `` --- error

Edge cases were:
1. If the user provided the same branch name as the one he was currently on
2. If the user didn't provide any name while he was on master