]> asedeno.scripts.mit.edu Git - git.git/commit
patch-id: Add support for mbox format
authorPaolo Bonzini <bonzini@gnu.org>
Mon, 19 Apr 2010 08:46:14 +0000 (10:46 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 19 Apr 2010 20:01:49 +0000 (13:01 -0700)
commit580fb25b7a941267aad747afdc74b9b4a42e154a
tree1a84ed3b7b0dcf78191474bda6e31a675ed82523
parent9ae144fbf2648a52da1cc5269918931b328180f9
patch-id: Add support for mbox format

I have an alias that takes two arguments and compares their patch IDs.
I would like to use to make sure I've tested exactly what I submit
(patch by patch), like

   git patch-cmp origin/master.. file-being-sent

However, I cannot do that because git patch-id is fooled by the "-- "
trailer that git format-patch puts, or likely by the MIME boundary.

This patch adds hunk parsing logic to git patch-id in order to detect an
out of place "-" line and split the patch when it comes.  In addition,
commit ids in the "From " lines are considered and printed in the output.

Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/patch-id.c
t/t4204-patch-id.sh