Re: Use of new .gitattributes working-tree-encoding attribute across different platform types

2018-07-03 Thread Junio C Hamano
Jeff King writes: > One thing I almost did in the example I gave above was to literally call > the encoding name by a "real" one. I.e.: > > echo '*.txt working-tree-encoding=iso-8859-1' >.gitattributes > git config encoding.iso-8859-1.replace latin1 > > or something. But I wondered if it was

Re: Use of new .gitattributes working-tree-encoding attribute across different platform types

2018-07-02 Thread Jeff King
On Mon, Jul 02, 2018 at 04:09:32PM +0200, Lars Schneider wrote: > Brian had a good argument [1] for an even more flexible system > proposed by Peff: > > > 1) We allow users to define custom encoding mappings in their Git config. > Example: > > git config --global core.encoding.myenc

Re: Use of new .gitattributes working-tree-encoding attribute across different platform types

2018-07-02 Thread Jeff King
On Sun, Jul 01, 2018 at 05:56:58PM +, brian m. carlson wrote: > On Thu, Jun 28, 2018 at 01:27:07PM -0400, Jeff King wrote: > > Yeah, that was along the lines that I was thinking. I wonder if anybody > > would ever need two such auto-encodings, though. Probably not. But > > another way to

Re: Use of new .gitattributes working-tree-encoding attribute across different platform types

2018-07-02 Thread Lars Schneider
> -Lars Schneider wrote: - > To: Jeff King > From: Lars Schneider > Date: 06/28/2018 18:21 > Cc: "brian m. carlson" , Steve Groeger > , git@vger.kernel.org > Subject: Re: Use of new .gitattributes working-tree-encoding attribute across > different

Re: Use of new .gitattributes working-tree-encoding attribute across different platform types

2018-07-02 Thread Steve Groeger
:21 Cc: "brian m. carlson" , Steve Groeger , git@vger.kernel.org Subject: Re: Use of new .gitattributes working-tree-encoding attribute across different platform types > On Jun 28, 2018, at 4:34 PM, Jeff King wrote: > > On Thu, Jun 28, 2018 at 02:44:47AM +, bri

Re: Use of new .gitattributes working-tree-encoding attribute across different platform types

2018-07-01 Thread brian m. carlson
On Thu, Jun 28, 2018 at 01:27:07PM -0400, Jeff King wrote: > Yeah, that was along the lines that I was thinking. I wonder if anybody > would ever need two such auto-encodings, though. Probably not. But > another way to think about it would be to allow something like: > >

Re: Use of new .gitattributes working-tree-encoding attribute across different platform types

2018-06-28 Thread Jeff King
On Thu, Jun 28, 2018 at 07:21:18PM +0200, Lars Schneider wrote: > How about this: > > 1) We allow users to set the encoding "auto". Example: > > *.txt working-tree-encoding=auto > > 2) We define a new variable `core.autoencoding`. By default the value is > UTF-8 (== no re-encoding) but

Re: Use of new .gitattributes working-tree-encoding attribute across different platform types

2018-06-28 Thread Lars Schneider
> On Jun 28, 2018, at 4:34 PM, Jeff King wrote: > > On Thu, Jun 28, 2018 at 02:44:47AM +, brian m. carlson wrote: > >> On Wed, Jun 27, 2018 at 07:54:52AM +, Steve Groeger wrote: >>> We have common code that is supposed to be usable across different >>> platforms and hence different

Re: Use of new .gitattributes working-tree-encoding attribute across different platform types

2018-06-28 Thread Jeff King
On Thu, Jun 28, 2018 at 02:44:47AM +, brian m. carlson wrote: > On Wed, Jun 27, 2018 at 07:54:52AM +, Steve Groeger wrote: > > We have common code that is supposed to be usable across different > > platforms and hence different file encodings. With the full support of the > >

Re: Use of new .gitattributes working-tree-encoding attribute across different platform types

2018-06-27 Thread brian m. carlson
On Wed, Jun 27, 2018 at 07:54:52AM +, Steve Groeger wrote: > We have common code that is supposed to be usable across different platforms > and hence different file encodings. With the full support of the > working-tree-encoding in the latest version of git on all platforms, how do > we

Re: Use of new .gitattributes working-tree-encoding attribute across different platform types

2018-06-27 Thread Torsten Bögershausen
On 27.06.18 09:54, Steve Groeger wrote: > Hi, > > Sorry for incomplete post earlier. Here is the full post: > > > In the latest version of git a new attribute has been added, > working-tree-encoding. The release notes states: > > 'The new "working-tree-encoding" attribute can ask Git to

Use of new .gitattributes working-tree-encoding attribute across different platform types

2018-06-27 Thread Steve Groeger
Hi, Sorry for incomplete post earlier. Here is the full post: In the latest version of git a new attribute has been added, working-tree-encoding. The release notes states: 'The new "working-tree-encoding" attribute can ask Git to convert the contents to the specified encoding when

Use of new .gitattributes working-tree-encoding attribute across different platform types

2018-06-27 Thread Steve Groeger
I could not find anything that would allow us to say 'if platform = z/OS then encoding=EBCDIC else encoding=ASCII'. Is there a way this can be done? Thanks Steve Groeger Java Runtimes Development IBM Hursley IBM United Kingdom Ltd Tel: (44) 1962 816911 Mobex: 279990 Mobile: 07718 517