While I like the idea behind the changes, the proposed patch is too narrow. There should be a way to ask diff to ignore (or report) any set of changes to metadata. Diff shouldn't use up two valuable option letters to handle two special cases of the more general idea.
The metadata in question include: * file size * file type (e.g., regular file, symlink, etc.) * permissions * number of hard links * device * inode number * raw device (if character or block special) * last access time (to the nearest nanosecond, if available) * last modification time (likewise) * list inode change time (likewise) * birthtime (likewise, and if birthtime is supported) * number of blocks * preferred blocksize Plus, of course, there's the data proper. Perhaps diff doesn't need to support every last bit of metadata, but it shouldn't stop with just two options, one to ignore all but size, and the other to report changes to last-mod time. Instead, it should have one more-general option specifying which parts of the metadata and/or data to compare. The default, as now, would be to report only changes in the file type and in the data proper. Ehud, if you're willing to work on this, would you be interested in getting the copyright paperwork done, so that we can incorporate your work into GNU diff? If so, please let me know.
