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