CodingGuidelines: use octal escapes, not hex
Extend the shell-scripting section of CodingGuidelines to suggest octal escape sequences (e.g. "\302\242") over hexadecimal (e.g. "\xc2\xa2") since the latter can be a source of portability problems. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
fe86abd751
commit
f0b68f0546
|
@ -188,6 +188,10 @@ For shell scripts specifically (not exhaustive):
|
|||
hopefully nobody starts using "local" before they are reimplemented
|
||||
in C ;-)
|
||||
|
||||
- Use octal escape sequences (e.g. "\302\242"), not hexadecimal (e.g.
|
||||
"\xc2\xa2") in printf format strings, since hexadecimal escape
|
||||
sequences are not portable.
|
||||
|
||||
|
||||
For C programs:
|
||||
|
||||
|
|
Loading…
Reference in New Issue