|
@@ -2377,6 +2377,14 @@ sub process {
|
|
|
|
|
|
my $rawline = $rawlines[$linenr - 1];
|
|
my $rawline = $rawlines[$linenr - 1];
|
|
|
|
|
|
|
|
+# check if it's a mode change, rename or start of a patch
|
|
|
|
+ if (!$in_commit_log &&
|
|
|
|
+ ($line =~ /^ mode change [0-7]+ => [0-7]+ \S+\s*$/ ||
|
|
|
|
+ ($line =~ /^rename (?:from|to) \S+\s*$/ ||
|
|
|
|
+ $line =~ /^diff --git a\/[\w\/\.\_\-]+ b\/\S+\s*$/))) {
|
|
|
|
+ $is_patch = 1;
|
|
|
|
+ }
|
|
|
|
+
|
|
#extract the line range in the file after the patch is applied
|
|
#extract the line range in the file after the patch is applied
|
|
if (!$in_commit_log &&
|
|
if (!$in_commit_log &&
|
|
$line =~ /^\@\@ -\d+(?:,\d+)? \+(\d+)(,(\d+))? \@\@(.*)/) {
|
|
$line =~ /^\@\@ -\d+(?:,\d+)? \+(\d+)(,(\d+))? \@\@(.*)/) {
|