public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
* [PATCH] git-contacts: do not fail parsing of good diffs
@ 2014-02-15 17:24 Lars Gullik Bjønnes
  2014-02-18 23:14 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Gullik Bjønnes @ 2014-02-15 17:24 UTC (permalink / raw)
  To: git


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>
---
 contrib/contacts/git-contacts | 2 --
 1 file changed, 2 deletions(-)

diff --git a/contrib/contacts/git-contacts b/contrib/contacts/git-contacts
index 428cc1a..dbe2abf 100755
--- a/contrib/contacts/git-contacts
+++ b/contrib/contacts/git-contacts
@@ -96,8 +96,6 @@ sub scan_patches {
                next unless $id;
                if (m{^--- (?:a/(.+)|/dev/null)$}) {
                        $source = $1;
-               } elsif (/^--- /) {
-                       die "Cannot parse hunk source: $_\n";
                } elsif (/^@@ -(\d+)(?:,(\d+))?/ && $source) {
                        my $len = defined($2) ? $2 : 1;
                        push @{$sources->{$source}{$id}}, [$1, $len] if $len;
-- 
1.9.0

-- 
	Lgb

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-02-21  0:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-15 17:24 [PATCH] git-contacts: do not fail parsing of good diffs Lars Gullik Bjønnes
2014-02-18 23:14 ` Junio C Hamano
2014-02-21  0:07   ` Lars Gullik Bjønnes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox