Re: [PATCH/RFC v5 7/7] Careful with CRLF when using e.g. UTF-16 for working-tree-encoding

2018-02-07 Thread Junio C Hamano
Torsten Bögershausen writes: >> the user explicitly tells us it is in UTF-16, right? Is there such a >> thing as UTF-16 binary? > > I don't think so, by definiton UTF-16 is ment to be text. > (this means that git ls-files --eol needs some update, I can have a look) > > Do we

Re: [PATCH/RFC v5 7/7] Careful with CRLF when using e.g. UTF-16 for working-tree-encoding

2018-02-06 Thread Torsten Bögershausen
On Fri, Feb 02, 2018 at 11:17:04AM -0800, Junio C Hamano wrote: > Torsten Bögershausen writes: > > > There are 2 opposite opionions/user expectations here: > > > > a) They are binary in the working tree, so git should leave the line endings > >as is. (Unless specified

Re: [PATCH/RFC v5 7/7] Careful with CRLF when using e.g. UTF-16 for working-tree-encoding

2018-02-02 Thread Junio C Hamano
Torsten Bögershausen writes: > There are 2 opposite opionions/user expectations here: > > a) They are binary in the working tree, so git should leave the line endings >as is. (Unless specified otherwise in the .attributes file) > ... > b) They are text files in the index. Git

Re: [PATCH/RFC v5 7/7] Careful with CRLF when using e.g. UTF-16 for working-tree-encoding

2018-01-31 Thread Lars Schneider
> On 31 Jan 2018, at 18:28, Torsten Bögershausen wrote: > > [] >>> That is a good one. >>> If you ever plan a re-roll (I don't at the moment) the *.proj extemsion >>> make much more sense in Documentation/gitattributes that *.tx >>> There no text files encoded in UTF-16 wich are

Re: [PATCH/RFC v5 7/7] Careful with CRLF when using e.g. UTF-16 for working-tree-encoding

2018-01-31 Thread Torsten Bögershausen
[] > > That is a good one. > > If you ever plan a re-roll (I don't at the moment) the *.proj extemsion > > make much more sense in Documentation/gitattributes that *.tx > > There no text files encoded in UTF-16 wich are called xxx.txt, but those > > are non-ideal examples. *.proj makes good sense

Re: [PATCH/RFC v5 7/7] Careful with CRLF when using e.g. UTF-16 for working-tree-encoding

2018-01-30 Thread Lars Schneider
> On 30 Jan 2018, at 15:40, Torsten Bögershausen wrote: > > On Tue, Jan 30, 2018 at 12:23:47PM +0100, Lars Schneider wrote: >> >>> On 29 Jan 2018, at 21:19, tbo...@web.de wrote: >>> >>> From: Torsten Bögershausen >>> >>> UTF-16 encoded files are treated as

Re: [PATCH/RFC v5 7/7] Careful with CRLF when using e.g. UTF-16 for working-tree-encoding

2018-01-30 Thread Torsten Bögershausen
On Tue, Jan 30, 2018 at 12:23:47PM +0100, Lars Schneider wrote: > > > On 29 Jan 2018, at 21:19, tbo...@web.de wrote: > > > > From: Torsten Bögershausen > > > > UTF-16 encoded files are treated as "binary" by Git, and no CRLF > > conversion is done. > > When the UTF-16 encoded

Re: [PATCH/RFC v5 7/7] Careful with CRLF when using e.g. UTF-16 for working-tree-encoding

2018-01-30 Thread Lars Schneider
> On 29 Jan 2018, at 21:19, tbo...@web.de wrote: > > From: Torsten Bögershausen > > UTF-16 encoded files are treated as "binary" by Git, and no CRLF > conversion is done. > When the UTF-16 encoded files are converted into UF-8 using the new s/UF-8/UTF-8/ >

[PATCH/RFC v5 7/7] Careful with CRLF when using e.g. UTF-16 for working-tree-encoding

2018-01-29 Thread tboegi
From: Torsten Bögershausen UTF-16 encoded files are treated as "binary" by Git, and no CRLF conversion is done. When the UTF-16 encoded files are converted into UF-8 using the new "working-tree-encoding", the CRLF are converted if core.autocrlf is true. This may lead to