On 09/26/2010 07:56 AM, Duncan Moore wrote: > I have some new options/changes for diff, which I'd like to > incorporate into diffutils:
Thanks for going to all that work! I haven't looked at the code yet (I'll reply privately about copyright license issues) but here are some quick thoughts about the suggestions. > 1) --quote-filenames > Filename quoting. I'd rather that troublsome file names always be quoted, instead of having an option that quotes them. Diff already has too many options. The implementation can use the already-existing code to quote file names, taken from gnulib. > 2) --if-different > File contents are assumed identical if the files have the same size > and timestamp. This makes sense, but the option name is poorly chosen. How about --assume-same? We could add options to --assume-same later, for example, if someone wants diff to assume that two files are the same if they have the same size, regardless of time stamp. > 3) --function-width=NUM > Allow a user specified 'function width' greater than 40 characters. OK, but this should be column width, not character count, to allow for Chinese characters (which are typically two columns). There's gnulib support for this. > 4) -r > Also shows the command performed for two files at the top level. I don't think POSIX would allow this change, and I don't see the need for it. > 5) Help reformatted.... > The help text has been reformatted, to make it easier to read (in fixed > width): The current formatting is to designed to look OK with varying-width fonts. I'd rather that any reformatting continue to have that property. > 6) --ignore-equivalent-strings=ERE > Ignore equivalent strings, that is, strings at the same position in > both files, matching an extended regular expression. Not sure what this means. > 7) --compare=PROPERTY_LIST > File properties other than contents can be considered as a > difference - timestamps, mode etc. This sort of thing sounds useful. It would be helpful to consider each change separately, rather than have single large globs of email and/or code.
