bug-diffutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-diffutils] bug#24629: bug#24629: Make unified diff configurable def


From: Paul Eggert
Subject: [bug-diffutils] bug#24629: bug#24629: Make unified diff configurable default
Date: Thu, 6 Oct 2016 16:48:59 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0

I'm afraid it's not that simple. The patch will cause diff3 to output that warning, since diff3 uses diff without --normal, so diff3.c needs fixing. Also, the manual needs fixing (doc/diffutils.texi). And the output of "diff --help" (src/diff.c). And there should be a test case testing the new behavior.

More important. Suppose I want a program with GNU diff's traditional behavior and so use a shell script 'mydiff' like this:

  #!/bin/sh
  exec diff --normal "$@"

This won't work, because if I invoke the script like this:

  mydiff -c foo bar

diff will complain about --normal conflicting with -c. So I suppose diff needs to change so that later output specifiers override earlier. But here things are a bit tricky, e.g., right now '-C5 -c' is equivalent to '-c -C5' and I assume we don't want to change this.

One other idea. If the invoker uses any long option, or any option other than -b and -r, diff can default to the -u output format regardless of whether POSIXLY_CORRECT is set. This is because POSIX does not specify the behavior of these other options.

Plus, it would be nice if we could address Eric's concerns somehow.

I hope I haven't scared you away entirely....





reply via email to

[Prev in Thread] Current Thread [Next in Thread]