Alternative approach: calculating diffs by line