Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [ANNOUNCE] Git 1.7.6.4

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:52:06

BJ Hargrave [off-list ref] writes:
The test

 invalid_ref "$(printf 'heads/foo\177')"

was added to t1402-check-ref-format.sh. However sh on my RHEL 4 system
does not handle the DEL (\177) character well in double quoted strings.

sh-3.00$ echo $(printf 'hello\177') | hexdump -C
00000000  68 65 6c 6c 6f 7f 0a                              |hello..|
00000007
sh-3.00$ echo "$(printf 'hello\177')" | hexdump -C
00000000  68 65 6c 6c 6f 0a                                 |hello.|
00000006

The double quotes cause the DEL (\177) character to be discarded.

Can this test be rewritten to avoid this apparent bug in sh on RHEL 4?
For older distros, I would prefer a workaround patch first tested by
distro packaging people and then upstreamed.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help