• Jeff King's avatar
    interpret-trailers: allow suppressing "---" divider · 1688c9a4
    Jeff King authored
    Even with the newly-tightened "---" parser, it's still
    possible for a commit message to trigger a false positive if
    it contains something like "--- foo". If the caller knows
    that it has only a single commit message, it can now tell us
    with the "--no-divider" option, eliminating any false
    positives.
    
    If we were designing this from scratch, I'd probably make
    this the default. But we've advertised the "---" behavior in
    the documentation since interpret-trailers has existed.
    Since it's meant to be scripted, breaking that would be a
    bad idea.
    
    Note that the logic is in the underlying trailer.c code,
    which is used elsewhere. The default there will keep the
    current behavior, but many callers will benefit from setting
    this new option. That's left for future patches.
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    1688c9a4
trailer.c 29 KB