Broken support for branch names with UTF-8 characters.
Created by: marcinant
To make things short:
Started with new project named "test" added branch named "zażółćgęśląjaźń"
Branch was added without any problem to local git working tree. I was unable to push this branch to GitLab.
marcin@neutrico-ws:~/testowy$ cd ~
marcin@neutrico-ws:~$ mkdir test
marcin@neutrico-ws:~$ cd test
marcin@neutrico-ws:~/test$ git init
Initialized empty Git repository in /home/marcin/test/.git/
marcin@neutrico-ws:~/test$ touch README
marcin@neutrico-ws:~/test$ git add README
marcin@neutrico-ws:~/test$ git commit -m 'first init'
[master (root-commit) 4cb7664] first init
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 README
marcin@neutrico-ws:~/test$ git remote add origin git@localhost:neutrico/test
marcin@neutrico-ws:~/test$ git push -u origin master
Counting objects: 3, done.
Writing objects: 100% (3/3), 215 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To git@localhost:neutrico/test
* [new branch] master -> master
Branch master set up to track remote branch master from origin.
marcin@neutrico-ws:~/test$ git checkout -b zażółćgęśląjaźń
Switched to a new branch 'zażółćgęśląjaźń'
marcin@neutrico-ws:~/test$ git push -u origin zażółćgęśląjaźń
Total 0 (delta 0), reused 0 (delta 0)
remote: /usr/lib/ruby/2.1.0/json/common.rb:223:in `encode': "\xC5" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)
remote: from /usr/lib/ruby/2.1.0/json/common.rb:223:in `generate'
remote: from /usr/lib/ruby/2.1.0/json/common.rb:223:in `generate'
remote: from /usr/lib/ruby/2.1.0/json/common.rb:394:in `dump'
remote: from /home/git/gitlab-shell/lib/gitlab_update.rb:56:in `update_redis'
remote: from /home/git/gitlab-shell/lib/gitlab_update.rb:40:in `exec'
remote: from hooks/update:13:in `<main>'
remote: error: hook declined to update refs/heads/zażółćgęśląjaźń
To git@localhost:neutrico/test
! [remote rejected] zażółćgęśląjaźń -> zażółćgęśląjaźń (hook declined)
error: failed to push some refs to 'git@localhost:neutrico/test'