Skip to content
  • Jeff King's avatar
    format-patch: print in-body "From" only when needed · 662cc30c
    Jeff King authored and Junio C Hamano's avatar Junio C Hamano committed
    Commit a9080475
    
     taught format-patch the "--from" option,
    which places the author ident into an in-body from header,
    and uses the committer ident in the rfc822 from header.  The
    documentation claims that it will omit the in-body header
    when it is the same as the rfc822 header, but the code never
    implemented that behavior.
    
    This patch completes the feature by comparing the two idents
    and doing nothing when they are the same (this is the same
    as simply omitting the in-body header, as the two are by
    definition indistinguishable in this case). This makes it
    reasonable to turn on "--from" all the time (if it matches
    your particular workflow), rather than only using it when
    exporting other people's patches.
    
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    662cc30c