Generalize the file index of diff.