Re: [PATCH 3/4 v4] ls-files: pass through safe options for --recurse-submodules
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 27, 2016, 20:11 UTC
- Message-ID
- <xmqqwphxm7av.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <xmqqh991nq34.fsf@gitster.mtv.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 15 quoted lines
> In nul_to_q and q_to_nul implementations (t/test-lib-functions.sh)
> we seem to avoid using "tr", even though q_to_cr and others do use
> it. I wonder if we had some portability issues with passing NUL
> through tr or something?
>
> ... digs and finds e85fe4d8 ("more tr portability test script
> fixes", 2008-03-12)
>
> So use something like
>
> perl -pe 'y/\012/\000/' <<\-EOF
> ...
> EOF
>
> instead, perhaps?I actually think it would make more sense to add
lf_to_nul () {
perl -pe 'y/\012/\000/'
}to t/test-lib-functions.sh somewhere near q_to_nul if we were to go this route.