{"thread":{"id":"34533","subject":"git and cyrillic branches","startedAt":"2013-07-25T12:19:48Z","lastAt":"2013-07-26T07:35:01Z","messageCount":9,"participants":["иванов иван","Konstantin Khomoutov","ксовиран","Martin Langhoff","Torsten Bögershausen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"224073","messageId":"922031374754788@web29h.yandex.ru","threadId":"34533","inReplyTo":null,"subject":"git and cyrillic branches","fromName":"иванов иван","fromEmail":"xowirun@yandex.ru","sentAt":"2013-07-25T12:19:48Z","receivedAt":"2013-07-25T12:19:48Z","isPatch":false,"sender":{"key":"xowirun@yandex.ru","avatar":null},"body":"hello! there is problem vith git and cyrillic (utf-8) names of branches. branch creates perfectly, but when i clone this remote branch to local host, there are 2 bugs:\n1) \"git branch\" doesnt show checked branch with asterisk (while on remote server it does)\n2) \"git push\" gives 2 errors: \"fatal: BRANCH_NAME cannot be resolved to branch.\" and \"fatal: The remote end hung up unexpectedly\"\nthanks.\n"},{"id":"224074","messageId":"20130725164522.f8841abf18742cc5f6e0fdbe@domain007.com","threadId":"34533","inReplyTo":"922031374754788@web29h.yandex.ru","subject":"Re: git and cyrillic branches","fromName":"Konstantin Khomoutov","fromEmail":"kostix+git@007spb.ru","sentAt":"2013-07-25T12:45:22Z","receivedAt":"2013-07-25T12:45:22Z","isPatch":false,"sender":{"key":"kostix+git@007spb.ru","avatar":null},"body":"On Thu, 25 Jul 2013 15:19:48 +0300\nиванов иван <xowirun@yandex.ru> wrote:\n\n> hello! there is problem vith git and cyrillic (utf-8) names of\n> branches. branch creates perfectly, but when i clone this remote\n> branch to local host, there are 2 bugs:\n> 1) \"git branch\" doesnt show checked branch with asterisk (while on\n> remote server it does)\n> 2) \"git push\" gives 2 errors: \"fatal: BRANCH_NAME cannot be resolved\n> to branch.\" and \"fatal: The remote end hung up unexpectedly\" thanks.\n\nWorks for me across two Debian systems: both have Git 1.7.10.4; user\naccounts on both systems have LANG=en_US.UTF-8 configured in their\nenvironment.\n\nDo both of your systems (local and remote) have an UTF-8-enabled (or\nencoding-agnostic, like \"C\") locale active?\n"},{"id":"224078","messageId":"20130725182851.c17d3ed662434d1d91838949@domain007.com","threadId":"34533","inReplyTo":"992731374757601@web29h.yandex.ru","subject":"Re: git and cyrillic branches","fromName":"Konstantin Khomoutov","fromEmail":"kostix+git@007spb.ru","sentAt":"2013-07-25T14:28:51Z","receivedAt":"2013-07-25T14:28:51Z","isPatch":false,"sender":{"key":"kostix+git@007spb.ru","avatar":null},"body":"On Thu, 25 Jul 2013 17:06:41 +0400\nксовиран <xowirun@yandex.ru> wrote:\n\n> >>  hello! there is problem vith git and cyrillic (utf-8) names of\n> >>  branches. branch creates perfectly, but when i clone this remote\n> >>  branch to local host, there are 2 bugs:\n> >>  1) \"git branch\" doesnt show checked branch with asterisk (while on\n> >>  remote server it does)\n> >>  2) \"git push\" gives 2 errors: \"fatal: BRANCH_NAME cannot be\n> >> resolved to branch.\" and \"fatal: The remote end hung up\n> >> unexpectedly\" thanks.\n> >\n> > Works for me across two Debian systems: both have Git 1.7.10.4; user\n> > accounts on both systems have LANG=en_US.UTF-8 configured in their\n> > environment.\n> >\n> > Do both of your systems (local and remote) have an UTF-8-enabled (or\n> > encoding-agnostic, like \"C\") locale active?\n>\n> oh, yes indeed. i was pushing from mac to ubuntu, but ubuntu to\n> ubuntu works fine. although #locale gives almost identical output, so\n> it is something to work out. спасибо за помощь! 25.07.2013, 16:45,\n\nI'm afraid, this might be not that simple: Git received certain tweaks\nto work around certain problems Mac OS X has (as I understand it) with\nhandling UTF-8 on various filesystems it supports; in particular, see\ncommits 76759c7dff53e8c84e975b88cb8245587c14c7ba [1]\nand b856ad623e4f686815986c0b9341dd1bfd791e71 [2] which were released as\npart of v1.7.12.\n\nSo... I'm not sure, but I beleive these fixes might have been related to\nhandling filenames in the work tree and the index only, not branches, as\nhaving branches with non-ASCII names is a weird idea to most\ndevelopers, I think.  So the question is: do you have Git >= 1.7.12 on\nyour Mac OS X machine?  If so, do you still experience this problem (I\nthink that Macs do not have non-UTF-8 locales anyway, so this is\nunlikely the root cause).\n\nP.S.\nPlease don't top-post as this breaks discussion flow and hence sucks.\n\n1. https://github.com/git/git/commit/76759c7\n2. https://github.com/git/git/commit/b856ad6\n"},{"id":"224080","messageId":"322491374763917@web5g.yandex.ru","threadId":"34533","inReplyTo":"20130725182851.c17d3ed662434d1d91838949@domain007.com","subject":"Re: git and cyrillic branches","fromName":"ксовиран","fromEmail":"xowirun@yandex.ru","sentAt":"2013-07-25T14:51:57Z","receivedAt":"2013-07-25T14:51:57Z","isPatch":false,"sender":{"key":"xowirun@yandex.ru","avatar":null},"body":"25.07.2013, 18:28, \"Konstantin Khomoutov\" <kostix+git@007spb.ru>:\n> On Thu, 25 Jul 2013 17:06:41 +0400\n> ксовиран <xowirun@yandex.ru> wrote:\n>\n>>>>   hello! there is problem vith git and cyrillic (utf-8) names of\n>>>>   branches. branch creates perfectly, but when i clone this remote\n>>>>   branch to local host, there are 2 bugs:\n>>>>   1) \"git branch\" doesnt show checked branch with asterisk (while on\n>>>>   remote server it does)\n>>>>   2) \"git push\" gives 2 errors: \"fatal: BRANCH_NAME cannot be\n>>>>  resolved to branch.\" and \"fatal: The remote end hung up\n>>>>  unexpectedly\" thanks.\n>>>  Works for me across two Debian systems: both have Git 1.7.10.4; user\n>>>  accounts on both systems have LANG=en_US.UTF-8 configured in their\n>>>  environment.\n>>>\n>>>  Do both of your systems (local and remote) have an UTF-8-enabled (or\n>>>  encoding-agnostic, like \"C\") locale active?\n>>  oh, yes indeed. i was pushing from mac to ubuntu, but ubuntu to\n>>  ubuntu works fine. although #locale gives almost identical output, so\n>>  it is something to work out. спасибо за помощь! 25.07.2013, 16:45,\n>\n> I'm afraid, this might be not that simple: Git received certain tweaks\n> to work around certain problems Mac OS X has (as I understand it) with\n> handling UTF-8 on various filesystems it supports; in particular, see\n> commits 76759c7dff53e8c84e975b88cb8245587c14c7ba [1]\n> and b856ad623e4f686815986c0b9341dd1bfd791e71 [2] which were released as\n> part of v1.7.12.\n>\n> So... I'm not sure, but I beleive these fixes might have been related to\n> handling filenames in the work tree and the index only, not branches, as\n> having branches with non-ASCII names is a weird idea to most\n> developers, I think.  So the question is: do you have Git >= 1.7.12 on\n> your Mac OS X machine?  If so, do you still experience this problem (I\n> think that Macs do not have non-UTF-8 locales anyway, so this is\n> unlikely the root cause).\n>\n> P.S.\n> Please don't top-post as this breaks discussion flow and hence sucks.\n>\n> 1. https://github.com/git/git/commit/76759c7\n> 2. https://github.com/git/git/commit/b856ad6\nthere is nothing wrong with having branches with non-ASCII names as english is not the only language in the world.\nproblem is still here, i've got ubuntu on VM and same shared git-folder causes this problem on Mac Os and no problems on Ubuntu.\ngit version on Mac is 1.8.0.1 (on Ubuntu is 1.7.10.4)\n"},{"id":"224081","messageId":"CACPiFCKDjLVrJWPYn1Y5290ipvpVaGzB0VhsJHb2GrPpiBO5gA@mail.gmail.com","threadId":"34533","inReplyTo":"322491374763917@web5g.yandex.ru","subject":"Re: git and cyrillic branches","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2013-07-25T15:26:28Z","receivedAt":"2013-07-25T15:26:28Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"On Thu, Jul 25, 2013 at 10:51 AM, ксовиран <xowirun@yandex.ru> wrote:\n> problem is still here, i've got ubuntu on VM and same shared git-folder causes this problem on Mac Os and no problems on Ubuntu.\n> git version on Mac is 1.8.0.1 (on Ubuntu is 1.7.10.4)\n\nOSX filesystem code canonicalizes UTF-8 filenames in a way that\ndisagrees with GIT's design (and Linux's fs design) which considers a\nfilename to be a bag of bytes better left alone.\n\nSo the ugly fixes applied to filenames need to be applied too to refs, I guess.\n\nAre you using packed refs? That's probably a good workaround in the\nmeantime. Using packed refs, git will not need to store the branchname\nas a filename...\n\ncheers,\n\n\n\nm\n--\n martin.langhoff@gmail.com\n -  ask interesting questions\n - don't get distracted with shiny stuff  - working code first\n ~ http://docs.moodle.org/en/User:Martin_Langhoff\n"},{"id":"224082","messageId":"20130725193423.585a5b54faeb90fb4249db45@domain007.com","threadId":"34533","inReplyTo":"322491374763917@web5g.yandex.ru","subject":"Re: git and cyrillic branches","fromName":"Konstantin Khomoutov","fromEmail":"kostix+git@007spb.ru","sentAt":"2013-07-25T15:34:23Z","receivedAt":"2013-07-25T15:34:23Z","isPatch":false,"sender":{"key":"kostix+git@007spb.ru","avatar":null},"body":"On Thu, 25 Jul 2013 18:51:57 +0400\nксовиран <xowirun@yandex.ru> wrote:\n\n[...]\n> > I'm afraid, this might be not that simple: Git received certain\n> > tweaks to work around certain problems Mac OS X has (as I\n> > understand it) with handling UTF-8 on various filesystems it\n> > supports; in particular, see commits\n[...]\n> > So... I'm not sure, but I beleive these fixes might have been\n> > related to handling filenames in the work tree and the index only,\n> > not branches, as having branches with non-ASCII names is a weird\n> > idea to most developers, I think.\n[...]\n> there is nothing wrong with having branches with non-ASCII names as\n> english is not the only language in the world.\n\nWell, this my remark was just to explain why the problem with branches\nwhich *are* files (well, unless they have become \"packed refs\") in the\nreference Git implementation, might had good chances to escape the\nscope of the tweaks being discussed.  Of course, there's nothing wrong\nwith non-ASCII branch names unless this impedes collaboration on a\nproject which uses them.\n\n> problem is still here, i've got ubuntu on VM and same shared\n> git-folder causes this problem on Mac Os and no problems on Ubuntu.\n> git version on Mac is 1.8.0.1 (on Ubuntu is 1.7.10.4)\n\nI hope someone possessing the necessary knowledge will look at it.\n"},{"id":"224084","messageId":"20130725200751.fbce144058b72752a079b545@domain007.com","threadId":"34533","inReplyTo":"322491374763917@web5g.yandex.ru","subject":"Re: git and cyrillic branches","fromName":"Konstantin Khomoutov","fromEmail":"flatworm@users.sourceforge.net","sentAt":"2013-07-25T16:07:51Z","receivedAt":"2013-07-25T16:07:51Z","isPatch":false,"sender":{"key":"flatworm@users.sourceforge.net","avatar":null},"body":"On Thu, 25 Jul 2013 18:51:57 +0400\nксовиран <xowirun@yandex.ru> wrote:\n\n[...]\n> > I'm afraid, this might be not that simple: Git received certain\n> > tweaks to work around certain problems Mac OS X has (as I\n> > understand it) with handling UTF-8 on various filesystems it\n> > supports; in particular, see commits\n> > 76759c7dff53e8c84e975b88cb8245587c14c7ba [1] and\n> > b856ad623e4f686815986c0b9341dd1bfd791e71 [2] which were released as\n> > part of v1.7.12.\n[...]\n\nAnd while we're at it, commit message of 76759c7 tells that in order\nfor the fixes to work, the core.precomposedunicode configuration\nvariable has to be set to 'true'.  Did you do that?  Did that help?\n"},{"id":"224099","messageId":"51F1D5F7.5060101@web.de","threadId":"34533","inReplyTo":"922031374754788@web29h.yandex.ru","subject":"Re: git and cyrillic branches","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2013-07-26T01:50:47Z","receivedAt":"2013-07-26T01:50:47Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 2013-07-25 14.19, иванов иван wrote:\n> hello! there is problem vith git and cyrillic (utf-8) names of branches. branch creates perfectly, but when i clone this remote branch to local host, there are 2 bugs:\n> 1) \"git branch\" doesnt show checked branch with asterisk (while on remote server it does)\n> 2) \"git push\" gives 2 errors: \"fatal: BRANCH_NAME cannot be resolved to branch.\" and \"fatal: The remote end hung up unexpectedly\"\n> thanks.\n\nIt could be helpful if you could provide more information.\nThe best could be a step-by-step instruction using a some \"mini repo\", \nso that we we can reproduce the problem.\nI have done an illustrating example using UTF-8, \n(not cyrillic, I don't have these letters on my keyboard ;-)\n\ntb@linux:~$ mkdir cyrill\ntb@linux:~$ cd cyrill/\ntb@linux:~/cyrill$ git init\nInitialized empty Git repository in /home/tb/cyrill/.git/\ntb@linux:~/cyrill$ echo File>File\ntb@linux:~/cyrill$ git checkout -b bränch\nSwitched to a new branch 'bränch'\ntb@linux:~/cyrill$ git add File\ntb@linux:~/cyrill$ git commit -m \"Add File\"\n[bränch (root-commit) e39d84e] Add File\n 1 file changed, 1 insertion(+)\n create mode 100644 \"File\"\ntb@linux:~/cyrill$ git branch\n* bränch\ntb@linux:~/cyrill$ \n\n\n\ntb@macos:~> git clone tb@linux:~/cyrill\nCloning into 'cyrill'...\ntb@linux's password: \nremote: Counting objects: 3, done.\nReceiving objects: 100% (3/3), done.\nremote: Total 3 (delta 0), reused 0 (delta 0)\ntb@macos:~> cd cyrill/\ntb@macos:~/cyrill> git branch\n* bränch\ntb@macos:~/cyrill> ls -l\ntotal 8\n-rw-r--r--  1 tb  staff  6 Jul 26 03:39 File\ntb@macos:~/cyrill> \n\n===================\nOther question:\nwhat does (on Mac OS)\ngit config core.precomposeunicode\ngive you?\n/Torsten\n"},{"id":"224113","messageId":"1094181374824101@web4h.yandex.ru","threadId":"34533","inReplyTo":"51F1D5F7.5060101@web.de","subject":"Re: git and cyrillic branches","fromName":"ксовиран","fromEmail":"xowirun@yandex.ru","sentAt":"2013-07-26T07:35:01Z","receivedAt":"2013-07-26T07:35:01Z","isPatch":false,"sender":{"key":"xowirun@yandex.ru","avatar":null},"body":"\n\n26.07.2013, 05:50, \"Torsten Bögershausen\" <tboegi@web.de>:\n> On 2013-07-25 14.19, иванов иван wrote:\n>\n>>  hello! there is problem vith git and cyrillic (utf-8) names of branches. branch creates perfectly, but when i clone this remote branch to local host, there are 2 bugs:\n>>  1) \"git branch\" doesnt show checked branch with asterisk (while on remote server it does)\n>>  2) \"git push\" gives 2 errors: \"fatal: BRANCH_NAME cannot be resolved to branch.\" and \"fatal: The remote end hung up unexpectedly\"\n>>  thanks.\n>\n> It could be helpful if you could provide more information.\n> The best could be a step-by-step instruction using a some \"mini repo\",\n> so that we we can reproduce the problem.\n> I have done an illustrating example using UTF-8,\n> (not cyrillic, I don't have these letters on my keyboard ;-)\n>\n> tb@linux:~$ mkdir cyrill\n> tb@linux:~$ cd cyrill/\n> tb@linux:~/cyrill$ git init\n> Initialized empty Git repository in /home/tb/cyrill/.git/\n> tb@linux:~/cyrill$ echo File>File\n> tb@linux:~/cyrill$ git checkout -b bränch\n> Switched to a new branch 'bränch'\n> tb@linux:~/cyrill$ git add File\n> tb@linux:~/cyrill$ git commit -m \"Add File\"\n> [bränch (root-commit) e39d84e] Add File\n>  1 file changed, 1 insertion(+)\n>  create mode 100644 \"File\"\n> tb@linux:~/cyrill$ git branch\n> * bränch\n> tb@linux:~/cyrill$\n>\n> tb@macos:~> git clone tb@linux:~/cyrill\n> Cloning into 'cyrill'...\n> tb@linux's password:\n> remote: Counting objects: 3, done.\n> Receiving objects: 100% (3/3), done.\n> remote: Total 3 (delta 0), reused 0 (delta 0)\n> tb@macos:~> cd cyrill/\n> tb@macos:~/cyrill> git branch\n> * bränch\n> tb@macos:~/cyrill> ls -l\n> total 8\n> -rw-r--r--  1 tb  staff  6 Jul 26 03:39 File\n> tb@macos:~/cyrill>\n>\n> ===================\n> Other question:\n> what does (on Mac OS)\n> git config core.precomposeunicode\n> give you?\n> /Torsten\n\nokay, i've changed core.precomposeunicode to true and seems it solved the problem, branches are listed just fine and git push goes good as well. i didn't look that way at first time, thought that is case for filenames only, not branches.\nthank you all for responces, i guess this time problem is really solved now. :)\n"}]}