Thread (4 messages) 4 messages, 3 authors, 2016-09-28

Re: [PATCH 3/4 v4] ls-files: pass through safe options for --recurse-submodules

From: Stefan Beller <hidden>
Date: 2016-09-27 20:59:24

Possibly related (same subject, not in this thread)

On Tue, Sep 27, 2016 at 1:52 PM, Brandon Williams [off-list ref] wrote:
On 09/27, Junio C Hamano wrote:
quoted
Junio C Hamano [off-list ref] writes:
quoted
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.
my mind is drawing a blank, what does the 'lf' in 'lf_to_nul' stand for?
line feed?
Yes, line feed. (Note that Git has to deal with this cross platform new lines
e.g. CRLF is common on Windows, CR was common on MAC, and LF is
Windows, so naming the new line as they are, makes sense here.)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help