• Anders Waldenborg's avatar
    pretty: add support for separator option in %(trailers) · 0b691d86
    Anders Waldenborg authored
    By default trailer lines are terminated by linebreaks ('\n'). By
    specifying the new 'separator' option they will instead be separated by
    user provided string and have separator semantics rather than terminator
    semantics. The separator string can contain the literal formatting codes
    %n and %xNN allowing it to be things that are otherwise hard to type
    such as %x00, or comma and end-parenthesis which would break parsing.
     $ git log --pretty='%(trailers:key=Reviewed-by,valueonly,separator=%x00)'
    Signed-off-by: default avatarAnders Waldenborg <anders@0x63.nu>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
trailer.h 2.47 KB