git-contacts: do not fail parsing of good diffs
If a line in a patch starts with "--- " it will be deemed malformed unless it also contains the proper diff header format. This situation can happen with a valid patch if it has a line starting with "-- " and that line is removed. This patch just removes the check in git-contacts. Signed-off-by: Lars Gullik Bjønnes <larsbj@gullik.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Lars Gullik Bjønnes committed
Feb 15, 2014 at 18:24 UTC
8f72011f1c4a626ed1c1e826661d42274f465e29
1 file changed
-2
contrib/contacts/git-contacts
-2
@@ -96,8 +96,6 @@ sub scan_patches {
96
next unless $id;
97
if (m{^--- (?:a/(.+)|/dev/null)$}) {
98
$source = $1;
99
- } elsif (/^--- /) {
100
- die "Cannot parse hunk source: $_\n";
99
} elsif (/^@@ -(\d+)(?:,(\d+))?/ && $source) {
100
my $len = defined($2) ? $2 : 1;
101
push @{$sources->{$source}{$id}}, [$1, $len] if $len;