Detect file mode changes.
Handle empty patches.