Hotfix with whitespaces in its name #52

ghost opened this Issue Sep 12, 2010 · 2 comments


None yet

2 participants

  1. Start new hotfix: git flow hotfix start 'strange name'
  2. Commit something
  3. Finish hotfix: git flow hotfix finish 'strange name'

Here strange things begin:

  1. I see the message “Branch 'hotfix/'strange name' does not exist and is required”
  2. Develop branch actually merged with hotfix.
  3. Master branch does not merged with hotfix.
  4. hotfix/'strange name' branch really does not exist.

Short answer: don't do it.

Long answer: All is implemented in shell scripting currently and spaces are a known danger in that world. Since the hotfix start works fine, I must be forgetting to quote the branch name somewhere in the hotfix finish script, but I didn't have the time to look at it. Of course, as long as Git supports branch names with spaces, git-flow should ideally support them, too, but I don't think there is a big need for it now, so it will be prioritised low.

I'll keep this one open for someone to fix/implement, though.


Actually, git itself does not allow spaces; this lmitation will also apply to the python rewrite, as the error message should be less confusing. Something like

require_valid_branch_name() {
    if ! git check-ref-format --branch "$1" &>/dev/null ; then
        die "Branch name '$1' is invalid. See git-check-ref-format(1)"

is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment