git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Torsten Bögershausen <tboegi@web.de>
Date
Jun 27, 2018, 17:38 UTC
Message-ID
<b0039999-fe6f-eee3-5cc6-4ca638dddf79@web.de>
In-Reply-To
<OF5D40FE06.C18CD7CD-ON002582B9.002B7A02-002582B9.002B7A07@notes.na.collabserv.com>
On 27.06.18 09:54, Steve Groeger wrote:
Show 20 quoted lines
> 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 checking out to the working
>    tree (and the other way around when checking in).'
>  We have been using this attribute on our z/OS systems using a version of git from Rocket software to convert files to EBCDIC for quite a while now. On other platforms (Linux, AIX etc) git ignored this attribute and therefore left the files in ASCII.
> 
> 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 have files converted to different encodings on different platforms?
> 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
[]
Did you consider to put a gitattributes file on machine level ?
https://git-scm.com/docs/gitattributes

[snipped the other places where to put gitattributes] ... Attributes for all users on a system should be placed in the $(prefix)/etc/gitattributes file.

Show 16 quoted lines
>  Java Runtimes Development
>  IBM Hursley
>  IBM United Kingdom Ltd
>  Tel: (44) 1962 816911 Mobex: 279990 Mobile: 07718 517 129
>  Fax (44) 1962 816800
>  Lotus Notes: Steve Groeger/UK/IBM
>  Internet: groeges@uk.ibm.com  
>    
>  
> Unless stated otherwise above:
>  IBM United Kingdom Limited - Registered in England and Wales with number 741598.
>  Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU      
> Unless stated otherwise above:
> IBM United Kingdom Limited - Registered in England and Wales with number 741598. 
> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
> 
Previous: Steve GroegerNext: brian m. carlson
Message 2 of 12 in “Use of new .gitattributes working-tree-encoding attribute across different platform types”
  1. Steve GroegerJun 27, 2018
  2. Torsten BögershausenJun 27, 2018
  3. brian m. carlsonJun 28, 2018
  4. Jeff KingJun 28, 2018
  5. Lars SchneiderJun 28, 2018
  6. Jeff KingJun 28, 2018
  7. brian m. carlsonJul 1, 2018
  8. Jeff KingJul 2, 2018
  9. Junio C HamanoJul 3, 2018
  10. Steve GroegerJul 2, 2018
  11. Lars SchneiderJul 2, 2018
  12. Jeff KingJul 2, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.