From: Junio C Hamano Date: Tue, 10 Jul 2018 16:31:46 GMT Subject: Re: [PATCH v1 2/2] convert: add alias support for 'working-tree-encoding' attributes Message-ID: In-Reply-To: <20180708183036.29459-3-larsxschneider@gmail.com> larsxschneider@gmail.com writes: > From: Lars Schneider > > In 107642fe26 ("convert: add 'working-tree-encoding' attribute", > 2018-04-15) we added an attribute which defines the working tree > encoding of a file. > > Some platforms might spell the name of a certain encoding differently or > some users might want to use different encodings on different platforms. > Add the Git config "encoding..insteadOf = " to > support these use-cases with a user specific mapping. If the alias > matches an existing encoding name, then the alias will take precedence. > The alias is case insensitive. > > Example: > > (in .gitattributes) > *.c working-tree-encoding=foo > > (in config) > [encoding "UTF-16"] > insteadOf = foo > > Signed-off-by: Lars Schneider > --- Hmph, when I was reading the discussion between you and Peff, I didn't expect it end up with a change too specific to this single attribute. I was instead imagining that a change would come closer to where we call iconv (perhaps we muck with in/out_encoding parameters to iconv_open()), so that places other than the working-tree-encoding (e.g. commit log message encoding) would start honoring the same configuration variable in a consistent way.