From: brian m. carlson Date: Thu, 28 Jun 2018 02:44:47 GMT Subject: Re: Use of new .gitattributes working-tree-encoding attribute across different platform types Message-ID: <20180628024446.GD644867@genre.crustytoothpaste.net> In-Reply-To: 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