From 4951498c0b1e3480effb132468ff134ad35efc40 Mon Sep 17 00:00:00 2001 From: Thomas Keller Date: Wed, 6 Oct 2010 21:37:53 +0000 Subject: [PATCH] Ignore pseudo diff stanzas which mention binary files. --- src/IDF/Diff.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/IDF/Diff.php b/src/IDF/Diff.php index c51e883..d6abe56 100644 --- a/src/IDF/Diff.php +++ b/src/IDF/Diff.php @@ -72,6 +72,9 @@ class IDF_Diff $indiff = true; continue; } else if (0 === strpos($line, '=========')) { + // ignore pseudo stanzas with a hint of a binary file + if (preg_match("/^# (.+) is binary/", $this->lines[$i])) + continue; // by default always use the new name of a possibly renamed file $current_file = self::getMtnFile($this->lines[$i+1]); // mtn 0.48 and newer set /dev/null as file path for dropped files