Implement parsing diffs and checking for changed lines

Add simple test cases for these situations and implement the code.