git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git and cyrillic branches
@ 2013-07-25 12:19 иванов иван
  2013-07-25 12:45 ` Konstantin Khomoutov
  2013-07-26  1:50 ` Torsten Bögershausen
  0 siblings, 2 replies; 9+ messages in thread
From: иванов иван @ 2013-07-25 12:19 UTC (permalink / raw)
  To: git

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:
1) "git branch" doesnt show checked branch with asterisk (while on remote server it does)
2) "git push" gives 2 errors: "fatal: BRANCH_NAME cannot be resolved to branch." and "fatal: The remote end hung up unexpectedly"
thanks.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: git and cyrillic branches
  2013-07-25 12:19 git and cyrillic branches иванов иван
@ 2013-07-25 12:45 ` Konstantin Khomoutov
       [not found]   ` <992731374757601@web29h.yandex.ru>
  2013-07-26  1:50 ` Torsten Bögershausen
  1 sibling, 1 reply; 9+ messages in thread
From: Konstantin Khomoutov @ 2013-07-25 12:45 UTC (permalink / raw)
  To: иванов иван
  Cc: git

On Thu, 25 Jul 2013 15:19:48 +0300
иванов иван <xowirun@yandex.ru> wrote:

> 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:
> 1) "git branch" doesnt show checked branch with asterisk (while on
> remote server it does)
> 2) "git push" gives 2 errors: "fatal: BRANCH_NAME cannot be resolved
> to branch." and "fatal: The remote end hung up unexpectedly" thanks.

Works for me across two Debian systems: both have Git 1.7.10.4; user
accounts on both systems have LANG=en_US.UTF-8 configured in their
environment.

Do both of your systems (local and remote) have an UTF-8-enabled (or
encoding-agnostic, like "C") locale active?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: git and cyrillic branches
       [not found]   ` <992731374757601@web29h.yandex.ru>
@ 2013-07-25 14:28     ` Konstantin Khomoutov
  2013-07-25 14:51       ` ксовиран
  0 siblings, 1 reply; 9+ messages in thread
From: Konstantin Khomoutov @ 2013-07-25 14:28 UTC (permalink / raw)
  To: ксовиран
  Cc: Konstantin Khomoutov

On Thu, 25 Jul 2013 17:06:41 +0400
ксовиран <xowirun@yandex.ru> wrote:

> >>  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:
> >>  1) "git branch" doesnt show checked branch with asterisk (while on
> >>  remote server it does)
> >>  2) "git push" gives 2 errors: "fatal: BRANCH_NAME cannot be
> >> resolved to branch." and "fatal: The remote end hung up
> >> unexpectedly" thanks.
> >
> > Works for me across two Debian systems: both have Git 1.7.10.4; user
> > accounts on both systems have LANG=en_US.UTF-8 configured in their
> > environment.
> >
> > Do both of your systems (local and remote) have an UTF-8-enabled (or
> > encoding-agnostic, like "C") locale active?
>
> oh, yes indeed. i was pushing from mac to ubuntu, but ubuntu to
> ubuntu works fine. although #locale gives almost identical output, so
> it is something to work out. спасибо за помощь! 25.07.2013, 16:45,

I'm afraid, this might be not that simple: Git received certain tweaks
to work around certain problems Mac OS X has (as I understand it) with
handling UTF-8 on various filesystems it supports; in particular, see
commits 76759c7dff53e8c84e975b88cb8245587c14c7ba [1]
and b856ad623e4f686815986c0b9341dd1bfd791e71 [2] which were released as
part of v1.7.12.

So... I'm not sure, but I beleive these fixes might have been related to
handling filenames in the work tree and the index only, not branches, as
having branches with non-ASCII names is a weird idea to most
developers, I think.  So the question is: do you have Git >= 1.7.12 on
your Mac OS X machine?  If so, do you still experience this problem (I
think that Macs do not have non-UTF-8 locales anyway, so this is
unlikely the root cause).

P.S.
Please don't top-post as this breaks discussion flow and hence sucks.

1. https://github.com/git/git/commit/76759c7
2. https://github.com/git/git/commit/b856ad6

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: git and cyrillic branches
  2013-07-25 14:28     ` Konstantin Khomoutov
@ 2013-07-25 14:51       ` ксовиран
  2013-07-25 15:26         ` Martin Langhoff
                           ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: ксовиран @ 2013-07-25 14:51 UTC (permalink / raw)
  To: Konstantin Khomoutov; +Cc: git

25.07.2013, 18:28, "Konstantin Khomoutov" <kostix+git@007spb.ru>:
> On Thu, 25 Jul 2013 17:06:41 +0400
> ксовиран <xowirun@yandex.ru> wrote:
>
>>>>   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:
>>>>   1) "git branch" doesnt show checked branch with asterisk (while on
>>>>   remote server it does)
>>>>   2) "git push" gives 2 errors: "fatal: BRANCH_NAME cannot be
>>>>  resolved to branch." and "fatal: The remote end hung up
>>>>  unexpectedly" thanks.
>>>  Works for me across two Debian systems: both have Git 1.7.10.4; user
>>>  accounts on both systems have LANG=en_US.UTF-8 configured in their
>>>  environment.
>>>
>>>  Do both of your systems (local and remote) have an UTF-8-enabled (or
>>>  encoding-agnostic, like "C") locale active?
>>  oh, yes indeed. i was pushing from mac to ubuntu, but ubuntu to
>>  ubuntu works fine. although #locale gives almost identical output, so
>>  it is something to work out. спасибо за помощь! 25.07.2013, 16:45,
>
> I'm afraid, this might be not that simple: Git received certain tweaks
> to work around certain problems Mac OS X has (as I understand it) with
> handling UTF-8 on various filesystems it supports; in particular, see
> commits 76759c7dff53e8c84e975b88cb8245587c14c7ba [1]
> and b856ad623e4f686815986c0b9341dd1bfd791e71 [2] which were released as
> part of v1.7.12.
>
> So... I'm not sure, but I beleive these fixes might have been related to
> handling filenames in the work tree and the index only, not branches, as
> having branches with non-ASCII names is a weird idea to most
> developers, I think.  So the question is: do you have Git >= 1.7.12 on
> your Mac OS X machine?  If so, do you still experience this problem (I
> think that Macs do not have non-UTF-8 locales anyway, so this is
> unlikely the root cause).
>
> P.S.
> Please don't top-post as this breaks discussion flow and hence sucks.
>
> 1. https://github.com/git/git/commit/76759c7
> 2. https://github.com/git/git/commit/b856ad6
there is nothing wrong with having branches with non-ASCII names as english is not the only language in the world.
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.
git version on Mac is 1.8.0.1 (on Ubuntu is 1.7.10.4)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: git and cyrillic branches
  2013-07-25 14:51       ` ксовиран
@ 2013-07-25 15:26         ` Martin Langhoff
  2013-07-25 15:34         ` Konstantin Khomoutov
  2013-07-25 16:07         ` Konstantin Khomoutov
  2 siblings, 0 replies; 9+ messages in thread
From: Martin Langhoff @ 2013-07-25 15:26 UTC (permalink / raw)
  To: ксовиран
  Cc: Konstantin Khomoutov, Git Mailing List

On Thu, Jul 25, 2013 at 10:51 AM, ксовиран <xowirun@yandex.ru> wrote:
> 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.
> git version on Mac is 1.8.0.1 (on Ubuntu is 1.7.10.4)

OSX filesystem code canonicalizes UTF-8 filenames in a way that
disagrees with GIT's design (and Linux's fs design) which considers a
filename to be a bag of bytes better left alone.

So the ugly fixes applied to filenames need to be applied too to refs, I guess.

Are you using packed refs? That's probably a good workaround in the
meantime. Using packed refs, git will not need to store the branchname
as a filename...

cheers,



m
--
 martin.langhoff@gmail.com
 -  ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 ~ http://docs.moodle.org/en/User:Martin_Langhoff

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: git and cyrillic branches
  2013-07-25 14:51       ` ксовиран
  2013-07-25 15:26         ` Martin Langhoff
@ 2013-07-25 15:34         ` Konstantin Khomoutov
  2013-07-25 16:07         ` Konstantin Khomoutov
  2 siblings, 0 replies; 9+ messages in thread
From: Konstantin Khomoutov @ 2013-07-25 15:34 UTC (permalink / raw)
  To: git
  Cc: Konstantin Khomoutov,
	ксовиран

On Thu, 25 Jul 2013 18:51:57 +0400
ксовиран <xowirun@yandex.ru> wrote:

[...]
> > I'm afraid, this might be not that simple: Git received certain
> > tweaks to work around certain problems Mac OS X has (as I
> > understand it) with handling UTF-8 on various filesystems it
> > supports; in particular, see commits
[...]
> > So... I'm not sure, but I beleive these fixes might have been
> > related to handling filenames in the work tree and the index only,
> > not branches, as having branches with non-ASCII names is a weird
> > idea to most developers, I think.
[...]
> there is nothing wrong with having branches with non-ASCII names as
> english is not the only language in the world.

Well, this my remark was just to explain why the problem with branches
which *are* files (well, unless they have become "packed refs") in the
reference Git implementation, might had good chances to escape the
scope of the tweaks being discussed.  Of course, there's nothing wrong
with non-ASCII branch names unless this impedes collaboration on a
project which uses them.

> 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.
> git version on Mac is 1.8.0.1 (on Ubuntu is 1.7.10.4)

I hope someone possessing the necessary knowledge will look at it.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: git and cyrillic branches
  2013-07-25 14:51       ` ксовиран
  2013-07-25 15:26         ` Martin Langhoff
  2013-07-25 15:34         ` Konstantin Khomoutov
@ 2013-07-25 16:07         ` Konstantin Khomoutov
  2 siblings, 0 replies; 9+ messages in thread
From: Konstantin Khomoutov @ 2013-07-25 16:07 UTC (permalink / raw)
  To: git
  Cc: Konstantin Khomoutov,
	ксовиран

On Thu, 25 Jul 2013 18:51:57 +0400
ксовиран <xowirun@yandex.ru> wrote:

[...]
> > I'm afraid, this might be not that simple: Git received certain
> > tweaks to work around certain problems Mac OS X has (as I
> > understand it) with handling UTF-8 on various filesystems it
> > supports; in particular, see commits
> > 76759c7dff53e8c84e975b88cb8245587c14c7ba [1] and
> > b856ad623e4f686815986c0b9341dd1bfd791e71 [2] which were released as
> > part of v1.7.12.
[...]

And while we're at it, commit message of 76759c7 tells that in order
for the fixes to work, the core.precomposedunicode configuration
variable has to be set to 'true'.  Did you do that?  Did that help?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: git and cyrillic branches
  2013-07-25 12:19 git and cyrillic branches иванов иван
  2013-07-25 12:45 ` Konstantin Khomoutov
@ 2013-07-26  1:50 ` Torsten Bögershausen
  2013-07-26  7:35   ` ксовиран
  1 sibling, 1 reply; 9+ messages in thread
From: Torsten Bögershausen @ 2013-07-26  1:50 UTC (permalink / raw)
  To: иванов иван
  Cc: git

On 2013-07-25 14.19, иванов иван wrote:
> 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:
> 1) "git branch" doesnt show checked branch with asterisk (while on remote server it does)
> 2) "git push" gives 2 errors: "fatal: BRANCH_NAME cannot be resolved to branch." and "fatal: The remote end hung up unexpectedly"
> thanks.

It could be helpful if you could provide more information.
The best could be a step-by-step instruction using a some "mini repo", 
so that we we can reproduce the problem.
I have done an illustrating example using UTF-8, 
(not cyrillic, I don't have these letters on my keyboard ;-)

tb@linux:~$ mkdir cyrill
tb@linux:~$ cd cyrill/
tb@linux:~/cyrill$ git init
Initialized empty Git repository in /home/tb/cyrill/.git/
tb@linux:~/cyrill$ echo File>File
tb@linux:~/cyrill$ git checkout -b bränch
Switched to a new branch 'bränch'
tb@linux:~/cyrill$ git add File
tb@linux:~/cyrill$ git commit -m "Add File"
[bränch (root-commit) e39d84e] Add File
 1 file changed, 1 insertion(+)
 create mode 100644 "File"
tb@linux:~/cyrill$ git branch
* bränch
tb@linux:~/cyrill$ 



tb@macos:~> git clone tb@linux:~/cyrill
Cloning into 'cyrill'...
tb@linux's password: 
remote: Counting objects: 3, done.
Receiving objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0)
tb@macos:~> cd cyrill/
tb@macos:~/cyrill> git branch
* bränch
tb@macos:~/cyrill> ls -l
total 8
-rw-r--r--  1 tb  staff  6 Jul 26 03:39 File
tb@macos:~/cyrill> 

===================
Other question:
what does (on Mac OS)
git config core.precomposeunicode
give you?
/Torsten

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: git and cyrillic branches
  2013-07-26  1:50 ` Torsten Bögershausen
@ 2013-07-26  7:35   ` ксовиран
  0 siblings, 0 replies; 9+ messages in thread
From: ксовиран @ 2013-07-26  7:35 UTC (permalink / raw)
  To: Torsten Bögershausen
  Cc: git@vger.kernel.org, Konstantin Khomoutov, martin.langhoff



26.07.2013, 05:50, "Torsten Bögershausen" <tboegi@web.de>:
> On 2013-07-25 14.19, иванов иван wrote:
>
>>  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:
>>  1) "git branch" doesnt show checked branch with asterisk (while on remote server it does)
>>  2) "git push" gives 2 errors: "fatal: BRANCH_NAME cannot be resolved to branch." and "fatal: The remote end hung up unexpectedly"
>>  thanks.
>
> It could be helpful if you could provide more information.
> The best could be a step-by-step instruction using a some "mini repo",
> so that we we can reproduce the problem.
> I have done an illustrating example using UTF-8,
> (not cyrillic, I don't have these letters on my keyboard ;-)
>
> tb@linux:~$ mkdir cyrill
> tb@linux:~$ cd cyrill/
> tb@linux:~/cyrill$ git init
> Initialized empty Git repository in /home/tb/cyrill/.git/
> tb@linux:~/cyrill$ echo File>File
> tb@linux:~/cyrill$ git checkout -b bränch
> Switched to a new branch 'bränch'
> tb@linux:~/cyrill$ git add File
> tb@linux:~/cyrill$ git commit -m "Add File"
> [bränch (root-commit) e39d84e] Add File
>  1 file changed, 1 insertion(+)
>  create mode 100644 "File"
> tb@linux:~/cyrill$ git branch
> * bränch
> tb@linux:~/cyrill$
>
> tb@macos:~> git clone tb@linux:~/cyrill
> Cloning into 'cyrill'...
> tb@linux's password:
> remote: Counting objects: 3, done.
> Receiving objects: 100% (3/3), done.
> remote: Total 3 (delta 0), reused 0 (delta 0)
> tb@macos:~> cd cyrill/
> tb@macos:~/cyrill> git branch
> * bränch
> tb@macos:~/cyrill> ls -l
> total 8
> -rw-r--r--  1 tb  staff  6 Jul 26 03:39 File
> tb@macos:~/cyrill>
>
> ===================
> Other question:
> what does (on Mac OS)
> git config core.precomposeunicode
> give you?
> /Torsten

okay, 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.
thank you all for responces, i guess this time problem is really solved now. :)

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-07-26  7:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-25 12:19 git and cyrillic branches иванов иван
2013-07-25 12:45 ` Konstantin Khomoutov
     [not found]   ` <992731374757601@web29h.yandex.ru>
2013-07-25 14:28     ` Konstantin Khomoutov
2013-07-25 14:51       ` ксовиран
2013-07-25 15:26         ` Martin Langhoff
2013-07-25 15:34         ` Konstantin Khomoutov
2013-07-25 16:07         ` Konstantin Khomoutov
2013-07-26  1:50 ` Torsten Bögershausen
2013-07-26  7:35   ` ксовиран

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).