emacsorphanage / org-page

[INACTIVE] A static site generator based on Emacs and org mode.
673 stars 99 forks source link

`op/new-repository' doesn't work in `ru_RU.UTF-8` locale #175

Closed smaximov closed 8 years ago

smaximov commented 8 years ago

When I tried to create new repository using op/new-repository, I got Fatal: failed to initialize new git repository… error.

When 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.

So 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.

Checking 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.

I suggest one of the following ways to the issue:

sillykelvin commented 8 years ago

thanks PR #176 , closing this issue.