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
brian m. carlson <sandals@crustytoothpaste.net>
Date
Jun 28, 2018, 02:44 UTC
Message-ID
<20180628024446.GD644867@genre.crustytoothpaste.net>
In-Reply-To
<OF5D40FE06.C18CD7CD-ON002582B9.002B7A02-002582B9.002B7A07@notes.na.collabserv.com>
On Wed, Jun 27, 2018 at 07:54:52AM +0000, 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 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?

I don't believe there is such functionality. Git doesn't have attributes that are conditional on the platform in that sort of way. You could use a smudge/clean filter and adjust the filter for the platform you're on, which might meet your needs.

-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
Previous: Torsten BögershausenNext: Jeff King
Message 3 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.