Re: [PATCH] commit: reject non-characters

2013-08-06 Thread Peter Krefting
Junio C Hamano: Indeed. Thanks. Testcases are good, but not if they don't actually catch the bug one has just introduced :-) -- >8 -- Subject: [PATCH] commit: typofix for xxFFF[EF] check We wanted to catch all codepoints that ends with FFFE and , not with 0FFFE and 0. Noticed and

Re: [PATCH] commit: reject non-characters

2013-08-05 Thread Junio C Hamano
Peter Krefting writes: > Peter Krefting: > >> -/* U+FFFE and U+ are guaranteed non-characters. */ >> -if ((codepoint & 0x1e) == 0xfffe) >> +/* U+xxFFFE and U+xx are guaranteed non-characters. */ >> +if ((codepoint & 0xe) == 0xfffe) >

Re: [PATCH] commit: reject non-characters

2013-08-05 Thread Peter Krefting
Peter Krefting: - /* U+FFFE and U+ are guaranteed non-characters. */ - if ((codepoint & 0x1e) == 0xfffe) + /* U+xxFFFE and U+xx are guaranteed non-characters. */ + if ((codepoint & 0xe) == 0xfffe) + ret

[PATCH] commit: reject non-characters

2013-07-09 Thread Peter Krefting
Unicode clause D14 defines all characters U+nFFFE and U+n (where 0 <= n <= 10h) as well as the range U+FDD0..U+FDEF as non-characters, reserved for internal use only. Disallow these characters in commit messages as they are normally not recommended for interchange. Signed-off-by: Peter Kreft