Re: [PATCH v10 6/9] convert: add 'working-tree-encoding' attribute

2018-03-07 Thread Junio C Hamano
Lars Schneider writes: > Nice catch. What do you think about this solution using is_encoding_utf8() > from utf.c? That helper was invented exactly for a case like this, I would think.

Re: [PATCH v10 6/9] convert: add 'working-tree-encoding' attribute

2018-03-07 Thread Lars Schneider
> On 07 Mar 2018, at 18:54, Eric Sunshine wrote: > > On Wed, Mar 7, 2018 at 12:30 PM, wrote: >> [...] >> Add an attribute to tell Git what encoding the user has defined for a >> given file. If the content is added to the index, then Git

Re: [PATCH v10 6/9] convert: add 'working-tree-encoding' attribute

2018-03-07 Thread Junio C Hamano
lars.schnei...@autodesk.com writes: > +static const char *git_path_check_encoding(struct attr_check_item *check) > +{ > + const char *value = check->value; > + > + if (ATTR_TRUE(value) || ATTR_FALSE(value) || ATTR_UNSET(value) || > + !strlen(value)) > + return NULL;

Re: [PATCH v10 6/9] convert: add 'working-tree-encoding' attribute

2018-03-07 Thread Eric Sunshine
On Wed, Mar 7, 2018 at 12:30 PM, wrote: > [...] > Add an attribute to tell Git what encoding the user has defined for a > given file. If the content is added to the index, then Git converts the > content to a canonical UTF-8 representation. On checkout Git will >

[PATCH v10 6/9] convert: add 'working-tree-encoding' attribute

2018-03-07 Thread lars . schneider
From: Lars Schneider Git recognizes files encoded with ASCII or one of its supersets (e.g. UTF-8 or ISO-8859-1) as text files. All other encodings are usually interpreted as binary and consequently built-in Git text processing tools (e.g. 'git diff') as well as most Git