pretty.c: add %x00 format specifier.
This adds a %xXX format which inserts two hexdigits after %x as a byte value in the resulting string. This can be used to add a NUL byte or any other byte that can make machine parsing easier. It is also necessary to use fwrite to print out the data since printf will terminate if you feed it a NUL. Signed-off-by: Govind Salinas <blix@sophiasuchtig.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
bc6100087c
commit
42c8c74c14
@ -123,3 +123,4 @@ The placeholders are:
|
||||
- '%Creset': reset color
|
||||
- '%m': left, right or boundary mark
|
||||
- '%n': newline
|
||||
- '%x00': print a byte from a hex code
|
||||
|
Reference in New Issue
Block a user