{"action":"closed","issue":{"url":"https://api.github.com/repos/kelvinh/org-page/issues/175","repository_url":"https://api.github.com/repos/kelvinh/org-page","labels_url":"https://api.github.com/repos/kelvinh/org-page/issues/175/labels{/name}","comments_url":"https://api.github.com/repos/kelvinh/org-page/issues/175/comments","events_url":"https://api.github.com/repos/kelvinh/org-page/issues/175/events","html_url":"https://github.com/kelvinh/org-page/issues/175","id":138659387,"number":175,"title":"`op/new-repository' doesn't work in `ru_RU.UTF-8` locale","user":{"login":"smaximov","id":1370047,"avatar_url":"https://avatars.githubusercontent.com/u/1370047?v=3","gravatar_id":"","url":"https://api.github.com/users/smaximov","html_url":"https://github.com/smaximov","followers_url":"https://api.github.com/users/smaximov/followers","following_url":"https://api.github.com/users/smaximov/following{/other_user}","gists_url":"https://api.github.com/users/smaximov/gists{/gist_id}","starred_url":"https://api.github.com/users/smaximov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smaximov/subscriptions","organizations_url":"https://api.github.com/users/smaximov/orgs","repos_url":"https://api.github.com/users/smaximov/repos","events_url":"https://api.github.com/users/smaximov/events{/privacy}","received_events_url":"https://api.github.com/users/smaximov/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-05T08:03:49Z","updated_at":"2016-03-18T13:21:57Z","closed_at":"2016-03-18T13:21:57Z","body":"When I tried to create new repository using `op/new-repository`, I got `Fatal: failed to initialize new git repository…` error.\r\n\r\nWhen I looked at the source code, I noticed that `op/git-init-repo` checks for the string `Initialized empty Git repository` in the command's output. In my case (`ru_RU.UTF-8` locale) `git init` returns the following message when succeeds (in Russian): `Инициализирован пустой репозиторий Git в $dirname`.\r\n\r\nSo even if the command finished successfully and an empty repository was created, `op/git-init-repo` considered it failing, which aborted the execution of `op/new-repository` . `op/git-init-repo` is not the only function which is broken on my system, `op/git-new-branch` won't work as well.\r\n\r\nChecking command output is not very reliable way to tell if an error occured. First, it won't work on systems where git messages are localized. Second, the messages may change in future.\r\n\r\nI suggest one of the following ways to the issue:\r\n\r\n* check the exit code instead of parsing the output to determine if something wrong has happened;\r\n* use an existing library which exposes git API (e.g, [git.el](https://github.com/rejeep/git.el))."}}