Re: [ANNOUNCE] Git 1.7.6.4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sep 23, 2011, at 19:37 , Junio C Hamano wrote:
> * "git check-ref-format --print" used to parrot a candidate string that
>   began with a slash (e.g. /refs/heads/master) without stripping it, to make
>   the result a suitably normalized string the caller can append to "$GIT_DIR/".

When building 1.7.6.4 on my RHEL 4 system, it failed t1402-check-ref-format.sh:

 not ok - 19 ref name 'heads/foo' is not valid

I bisected and found that commit f3738c1ce9193a4bf45ba1a3ea67d0cf32da0257 introduced the issue. 

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?

-- 

BJ Hargrave



--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]