Re: t0028-working-tree-encoding.sh failing on musl based systems (Alpine Linux)

2019-02-09 Thread Kevin Daudt
On Fri, Feb 08, 2019 at 08:42:19PM +, brian m. carlson wrote: > On Fri, Feb 08, 2019 at 09:23:36PM +0100, Kevin Daudt wrote: > > Firstly, the tests expect iconv -t UTF-16 to output a BOM, which it > > indeed does not do on Alpine. Secondly, git itself also expects the BOM > > to be present when

Re: t0028-working-tree-encoding.sh failing on musl based systems (Alpine Linux)

2019-02-09 Thread Torsten Bögershausen
On 08.02.19 07:04, Rich Felker wrote: > On Fri, Feb 08, 2019 at 12:17:05AM +, brian m. carlson wrote: [] >> Even if Git were to produce a BOM to work around this issue, then we'd >> still have the problem that any program using musl will write data in >> UTF-16 without a BOM. Moreover, because

Re: t0028-working-tree-encoding.sh failing on musl based systems (Alpine Linux)

2019-02-08 Thread brian m. carlson
On Fri, Feb 08, 2019 at 03:12:22PM -0800, Junio C Hamano wrote: > "brian m. carlson" writes: > > > +test_lazy_prereq NO_BOM ' > > + printf abc | iconv -f UTF-8 -t UTF-16 && > > + test $(wc -c) = 6 > > +' > > This must be "just for illustration of idea" patch? The pipeline > goes to the stan

Re: t0028-working-tree-encoding.sh failing on musl based systems (Alpine Linux)

2019-02-08 Thread Junio C Hamano
"brian m. carlson" writes: > +test_lazy_prereq NO_BOM ' > + printf abc | iconv -f UTF-8 -t UTF-16 && > + test $(wc -c) = 6 > +' This must be "just for illustration of idea" patch? The pipeline goes to the standard output, and nobody feeds "wc". But I think I got the idea. In the real

Re: t0028-working-tree-encoding.sh failing on musl based systems (Alpine Linux)

2019-02-08 Thread brian m. carlson
On Fri, Feb 08, 2019 at 09:23:36PM +0100, Kevin Daudt wrote: > Firstly, the tests expect iconv -t UTF-16 to output a BOM, which it > indeed does not do on Alpine. Secondly, git itself also expects the BOM > to be present when the encoding is set to UTF-16, otherwise it will > complain. Yeah, we de

Re: t0028-working-tree-encoding.sh failing on musl based systems (Alpine Linux)

2019-02-08 Thread Kevin Daudt
On Fri, Feb 08, 2019 at 09:50:07AM -0800, Junio C Hamano wrote: > "brian m. carlson" writes: > > >> So would you suggest that we just skip this test on Alpine Linux? > > > > That's not exactly what I said. If Alpine Linux users are never going to > > use this functionality and don't care that it'

Re: t0028-working-tree-encoding.sh failing on musl based systems (Alpine Linux)

2019-02-08 Thread Junio C Hamano
"brian m. carlson" writes: >> So would you suggest that we just skip this test on Alpine Linux? > > That's not exactly what I said. If Alpine Linux users are never going to > use this functionality and don't care that it's broken, then that's a > fine solution. > > As originally mentioned, musl c

Re: t0028-working-tree-encoding.sh failing on musl based systems (Alpine Linux)

2019-02-08 Thread Rich Felker
On Fri, Feb 08, 2019 at 12:55:11PM +0100, Kevin Daudt wrote: > On Fri, Feb 08, 2019 at 11:45:02AM +, brian m. carlson wrote: > > On Fri, Feb 08, 2019 at 01:04:03AM -0500, Rich Felker wrote: > > [..] > > > In any case, this test seems mainly relevant to Windows users wanting > > > to store sourc

Re: t0028-working-tree-encoding.sh failing on musl based systems (Alpine Linux)

2019-02-08 Thread brian m. carlson
On Fri, Feb 08, 2019 at 12:55:11PM +0100, Kevin Daudt wrote: > On Fri, Feb 08, 2019 at 11:45:02AM +, brian m. carlson wrote: > > On Fri, Feb 08, 2019 at 01:04:03AM -0500, Rich Felker wrote: > > [..] > > > In any case, this test seems mainly relevant to Windows users wanting > > > to store sourc

Re: t0028-working-tree-encoding.sh failing on musl based systems (Alpine Linux)

2019-02-08 Thread Kevin Daudt
On Fri, Feb 08, 2019 at 11:45:02AM +, brian m. carlson wrote: > On Fri, Feb 08, 2019 at 01:04:03AM -0500, Rich Felker wrote: > [..] > > In any case, this test seems mainly relevant to Windows users wanting > > to store source files in UTF-16LE with BOM. This doesn't really make > > sense to do

Re: t0028-working-tree-encoding.sh failing on musl based systems (Alpine Linux)

2019-02-08 Thread brian m. carlson
On Fri, Feb 08, 2019 at 01:04:03AM -0500, Rich Felker wrote: > That information is outdated and someone from our side should update > it; since 1.1.19, musl treats "UTF-16" input as ambiguous endianness > determined by BOM, defaulting to big if there's no BOM. However output > is always big endian,

Re: t0028-working-tree-encoding.sh failing on musl based systems (Alpine Linux)

2019-02-07 Thread Rich Felker
On Fri, Feb 08, 2019 at 12:17:05AM +, brian m. carlson wrote: > [Please skip using Reply-To and instead of Mail-Followup-To so that > responses also go to the list.] > > On Thu, Feb 07, 2019 at 10:59:35PM +0100, Kevin Daudt wrote: > > I'm trying to get the git test suite passing on Alpine Linu

Re: t0028-working-tree-encoding.sh failing on musl based systems (Alpine Linux)

2019-02-07 Thread brian m. carlson
[Please skip using Reply-To and instead of Mail-Followup-To so that responses also go to the list.] On Thu, Feb 07, 2019 at 10:59:35PM +0100, Kevin Daudt wrote: > I'm trying to get the git test suite passing on Alpine Linux, which is > based on musl libc. > > All tests in t0028-working-tree-encod

t0028-working-tree-encoding.sh failing on musl based systems (Alpine Linux)

2019-02-07 Thread Kevin Daudt
I'm trying to get the git test suite passing on Alpine Linux, which is based on musl libc. All tests in t0028-working-tree-encoding.sh are currently failing, because musl iconv does not support statefull output of UTF-16/32 (eg, it does not output a BOM), while git is expecting that to be present: