Skip to content

pre-push hook fails when pushing tags #480

@hasghari

Description

@hasghari

When I run git push --tags git@heroku.com:repo.git the pre-push hook fails with the following exception:

Running pre-push hooks
Check for illegal pushes to protected branches....[ProtectedBranches] FAILED
Hook raised unexpected error
no implicit conversion of nil into String
/Users/hasghari/.rvm/gems/ruby-2.2.5@ue/gems/overcommit-0.38.0/lib/overcommit/hook/pre_push/protected_branches.rb:25:in `fnmatch'
/Users/hasghari/.rvm/gems/ruby-2.2.5@ue/gems/overcommit-0.38.0/lib/overcommit/hook/pre_push/protected_branches.rb:25:in `block in protected?'
/Users/hasghari/.rvm/gems/ruby-2.2.5@ue/gems/overcommit-0.38.0/lib/overcommit/hook/pre_push/protected_branches.rb:24:in `any?'
/Users/hasghari/.rvm/gems/ruby-2.2.5@ue/gems/overcommit-0.38.0/lib/overcommit/hook/pre_push/protected_branches.rb:24:in `protected?'
/Users/hasghari/.rvm/gems/ruby-2.2.5@ue/gems/overcommit-0.38.0/lib/overcommit/hook/pre_push/protected_branches.rb:18:in `block in illegal_pushes'
/Users/hasghari/.rvm/gems/ruby-2.2.5@ue/gems/overcommit-0.38.0/lib/overcommit/hook/pre_push/protected_branches.rb:17:in `select'
/Users/hasghari/.rvm/gems/ruby-2.2.5@ue/gems/overcommit-0.38.0/lib/overcommit/hook/pre_push/protected_branches.rb:17:in `illegal_pushes'
/Users/hasghari/.rvm/gems/ruby-2.2.5@ue/gems/overcommit-0.38.0/lib/overcommit/hook/pre_push/protected_branches.rb:5:in `run'
/Users/hasghari/.rvm/gems/ruby-2.2.5@ue/gems/overcommit-0.38.0/lib/overcommit/hook/base.rb:45:in `block in run_and_transform'
/Users/hasghari/.rvm/gems/ruby-2.2.5@ue/gems/overcommit-0.38.0/lib/overcommit/utils.rb:260:in `with_environment'
/Users/hasghari/.rvm/gems/ruby-2.2.5@ue/gems/overcommit-0.38.0/lib/overcommit/hook/base.rb:45:in `run_and_transform'
/Users/hasghari/.rvm/gems/ruby-2.2.5@ue/gems/overcommit-0.38.0/lib/overcommit/hook_runner.rb:152:in `run_hook'
/Users/hasghari/.rvm/gems/ruby-2.2.5@ue/gems/overcommit-0.38.0/lib/overcommit/hook_runner.rb:88:in `block in consume'
/Users/hasghari/.rvm/gems/ruby-2.2.5@ue/gems/overcommit-0.38.0/lib/overcommit/hook_runner.rb:85:in `loop'
/Users/hasghari/.rvm/gems/ruby-2.2.5@ue/gems/overcommit-0.38.0/lib/overcommit/hook_runner.rb:85:in `consume'

✗ One or more pre-push hooks failed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions