Efficiently calculating differences between file using diff file
You need to parse the patch file format correctly. Otherwise the next patch that deletes an SQL comment will confuse your program, as it looks like this:

--- old_file.sql
+++ new_file.sql
@@ -1,1 +1,1 @@
--- SQL comment
+SELECT * FROM table;


Your current code interprets the removed line as a removed file.

The file format is explained here: http://www.gnu.org/software/diffutils/manual/html_node/Detailed-Unified.html

Since there are other people who had the same problem, you could just build on their work instead of writing your own, e.g. https://github.com/thombergs/diffparser.