summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* cmp: report prefix length when one file is shorterPaul Eggert2017-05-045-11/+200
| | | | | | | | | Requested by Dan Jacobson (Bug#22816). * NEWS: * doc/diffutils.texi (Invoking cmp, cmp Options): Document this. * src/cmp.c (cmp): Implement it. * tests/Makefile.am (TESTS): Add cmp. * tests/cmp: New file.
* tests: add test for latest fixJim Meyering2017-05-023-0/+25
| | | | | | * NEWS (Bug fixes): Describe it. * tests/invalid-re: New test for just-fixed bug. * tests/Makefile.am (TESTS): Add it.
* gnulib: update to latestJim Meyering2017-05-021-0/+0
|
* diff: don't crash if regexp is invalidPaul Eggert2017-04-271-1/+1
| | | | | | Problem reported by Marcel Böhme in: http://lists.gnu.org/archive/html/bug-diffutils/2017-04/msg00002.html * src/diff.c (add_regexp): Exit if re_compile_pattern fails.
* tests: avoid false failure for unreadable /proc/cmdlinejulama2017-03-241-1/+1
| | | | | | | * tests/brief-vs-stat-zero-kernel-lies: Use "test -r" rather than just "test -f". This avoids a false test failure on a linux system with grsecurity and its GRKERNSEC_PROC_USER option enabled, for which /proc/cmdline is unreadable. Reported in https://bugs.gnu.org/26155
* tests: avoid false failure with some shells on debian, freebsdJim Meyering2017-02-011-1/+1
| | | | | | | | * tests/colors: Move the TERM=dumb setting into the code run by "returns_", since some shells do not propagate envvar setting through to a use of a function like this. That would cause this test to fail because results were colorized when they should not have been. Reported by Nelson Beebe.
* maint: add "introduced in 3.4" in latest NEWS entryJim Meyering2017-01-311-0/+1
| | | | * NEWS: Update. Also, thanks to Nelson Beebe for reporting this.
* diff: avoid UMR with ---presume-output-ttyJim Meyering2017-01-312-0/+4
| | | | | | | * src/diff.c (main): Always define presume_output_tty. Otherwise, it would be read uninitialized. Introduced in v3.3-45-g17e2698 * NEWS (Bug fixes): Mention it.
* gnulib: update to latest; and update bootstrap and init.shJim Meyering2017-01-313-62/+53
|
* maint: change "time stamp" to "timestamp" globallyJim Meyering2017-01-314-45/+45
| | | | | | | | This avoids a new syntax-check failure. * ChangeLog-2008: Perform that change. * doc/diffutils.texi: Likewise. * NEWS: Likewise. * cfg.mk: Update the old news hash accordingly.
* maint: update gnulib and copyright dates for 2017Jim Meyering2017-01-0143-42/+42
| | | | | * gnulib: Update to latest. * all files: Run "make update-copyright".
* tests: use "returns_" rather than explicit comparison with "$?"Jim Meyering2016-11-0811-70/+44
| | | | | | | | | | | | | | * tests/colors: Use "returns_ 1" rather than testing $? = 1 * tests/basic: Likewise. * tests/binary: Likewise. * tests/filename-quoting: Likewise. * tests/function-line-vs-leading-space: Likewise. * tests/ignore-matching-lines: Likewise. * tests/label-vs-func: Likewise. * tests/new-file: Likewise. * tests/no-dereference: Likewise. * tests/no-newline-at-eof: Likewise. * tests/stdin: Likewise.
* diff: fix big performance degradation in 3.4Paul Eggert2016-10-253-2/+19
| | | | | | | | | * NEWS, doc/diffutils.texi (Overview): Document this. * src/analyze.c (diff_2_files): Restore too_expensive heuristic, but this time with a floor that is 16 times the old floor. This should fix Bug#16848, by generating good-quality output for its test case, while not introducing Bug#24715, by running nearly as fast as diff-3.3 for that test case.
* build: update gnulib submodule to latestPaul Eggert2016-10-251-0/+0
|
* maint: use die rather than errorJim Meyering2016-10-167-29/+60
| | | | | | | | | | | | | | | | | Use "die (N, ..." rather than "error (N, ..." whenever N is a nonzero constant. That lets the compiler know that control never goes beyond that point, and thus makes unnecessary the occasional following "abort ();" or "break;" statement we have historically added to inform static analysis tools of this aspect of "error" semantics. * src/die.h: New file. * src/Makefile.am (noinst_HEADERS): Add it. * src/cmp.c: Use die in place of error whenever the first argument is a nonzero constant. Also remove any immediately- following call to abort, and include "die.h". * src/diff.c: Likewise. * src/diff3.c: Likewise. * src/sdiff.c: Likewise. * src/util.c: Likewise.
* gnulib: update to latestJim Meyering2016-10-021-0/+0
|
* build: avoid GCC 7's new warningsJim Meyering2016-10-022-2/+4
| | | | | | | | * src/util.c (get_funky_string): Adjust comment so that GCC 7's -Wimplicit-fallthrough recognizes it. * src/diff3.c (main): Cast boolean MERGE to "int" to avoid this: diff3.c:341:25: error: '~' on a boolean expression \ [-Werror=bool-operation]
* gnulib: update to latestJim Meyering2016-08-301-0/+0
|
* gnulib: update to latest, to port to upcoming GCC 7Jim Meyering2016-08-291-0/+0
| | | | | | | This fixes compilation errors when using gcc-7-to-be that were due to missing backslashes in gnulib's intprops.h and an API change in functions like __builtin_add_overflow. This ports to GCC 7's newer built-in overflow-checking functions.
* diff: don't assume ptrdiff_t <= long long intPaul Eggert2016-08-281-5/+7
| | | | | * src/system.h (printint, pI): Port to (theoretical) platforms where ptrdiff_t is wider than long long int (Bug#24311).
* diff: port line numbers to mingw64Paul Eggert2016-08-2710-64/+86
| | | | | | | | Problem reported by Peter Rosin (Bug#24311). * src/system.h (printint, pI): New typedef and macro. All uses of 'long int' and "%l" in printf format replaced by 'printint' and "%"pI respectively. * src/ifdef.c (do_printf_spec): Don't assume pI is length 1.
* maint: post-release administriviaJim Meyering2016-08-203-2/+5
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 3.5v3.5Jim Meyering2016-08-201-1/+1
| | | | * NEWS: Record release date.
* build: arrange to build with -fno-common, when possibleJim Meyering2016-08-161-0/+1
| | | | | | * configure.ac (WERROR_CFLAGS): Add -fno-common, when possible. This would have prevented the duplicate definition of presume_output_tty that was fixed in v3.4-10-gc2dc91f.
* diff: avoid duplicate definition of presume_output_ttyHanno Böck2016-08-161-2/+0
| | | | | * src/util.c (presume_output_tty): Remove this definition. The other is in diff.h. Reported in https://bugs.gnu.org/24248
* gnulib: update to latestJim Meyering2016-08-141-0/+0
|
* tests: diff3: work around missing seq on some systemsJim Meyering2016-08-141-0/+12
| | | | | | * tests/diff3 (seq): Provide a seq replacement function, since at least AIX, SunOS 5.10, OpenBSD-5.8 lack it. Reported by Assaf Gordon in https://bugs.gnu.org/24227#8
* diff3: fix leaks, for realJim Meyering2016-08-132-4/+118
| | | | | | * src/diff3.c (struct diff_block)[lint]: Add member, n2. (free_diff_block, next_to_n2): New functions. * tests/diff3: Add more test coverage.
* maint: require that commit messages be of a certain formJim Meyering2016-08-136-0/+270
| | | | | | | | | | | | * bootstrap.conf (bootstrap_epilogue): Merge from coreutils, so that a local commit hook will now help enforce consistent commit messages. * Makefile.am (check-git-hook-script-sync): New rule, largely copied from coreutils. * scripts/git-hooks/commit-msg: New file, from coreutils, but with adapted list of program names. * scripts/git-hooks/applypatch-msg: New file, from git. * scripts/git-hooks/pre-applypatch: Likewise. * scripts/git-hooks/pre-commit: Likewise.
* diff3: fix heap use-after-free; add minimal diff3 test coverageBastian Beischer2016-08-134-1/+34
| | | | | | | | | | Commit v3.3-42-g3b74a90, "FIXME: src/diff3: plug a leak" added an invalid use of free, leading to use-after-free in nearly any invocation of diff3. Revert that commit. * NEWS (Bug fixes): Mention it. * tests/diff3: New file, to add minimal test coverage. * tests/Makefile.am (TESTS): Add it. Reported by Bastian Beischer in http://bugs.gnu.org/24210
* build: ignore texinfo build artifactsJim Meyering2016-08-131-1/+5
| | | | * .gitignore: Ignore texinfo artifacts in doc/.
* maint: diff3: remove an unreachable statementJim Meyering2016-08-131-1/+0
| | | | * src/diff3.c (main): Remove unreachable "return" after exit from main.
* diff: disable colorization for TERM=dumbJim Meyering2016-08-083-0/+16
| | | | | | | | * src/diff.c (main): With --color or --color=auto, when TERM is "dumb", disable colorization. Suggested by Daniel Colascione. * NEWS (Bug fixes): Mention it. * tests/colors: Add a test that would fail without this change, yet passes with it.
* maint: post-release administriviaJim Meyering2016-08-083-2/+5
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 3.4v3.4Jim Meyering2016-08-081-1/+1
| | | | * NEWS: Record release date.
* gnulib: update to latestJim Meyering2016-08-061-0/+0
|
* tests: tweak built_programs definitionJim Meyering2016-08-061-2/+6
| | | | | | | * tests/Makefile.am (built_programs): Adjust to work around what may be a problem due to interaction between Solaris 10's /bin/sh and an old version of GNU make. Reported by Dagobert Michelsen in https https://bugs.gnu.org/24137.
* gnulib: update to latestJim Meyering2016-08-021-0/+0
|
* tests: skip a /proc/self-dependent test on the HurdJim Meyering2016-08-021-0/+8
| | | | | | * tests/brief-vs-stat-zero-kernel-lies: The Hurd's /proc/self is not useful, so detect that and skip the test that requires it. Reported by Assaf Gordon in https://debbugs.gnu.org/24121#29
* tests/colors: fix portability problem with touch --dateJim Meyering2016-08-011-1/+2
| | | | | | * tests/colors (epoch): Don't use GNU touch's --date=$epoch option. Use the portable -t 197001010000.00. Reported by Assaf Gordon in https://debbugs.gnu.org/24121#8
* build: Solaris 9: avoid link failure due to isblank useJim Meyering2016-08-011-0/+1
| | | | | * bootstrap.conf (gnulib_modules): Add isblank, to avoid a link error on Solaris 9 Sparc. Reported by Dagobert Michelsen.
* test: improve test infrastructureJim Meyering2016-08-012-23/+113
| | | | | | | * tests/envvar-check: New file, copied from grep, with the addition of the EDITOR and GREP_OPTIONS envvar names. * tests/Makefile.am (EXTRA_DIST): Add it. (TESTS_ENVIRONMENT): Revamp, to be more like that of grep.
* maint: remove gl/lib/reg*.c.diff; no longer neededJim Meyering2016-07-313-135/+0
| | | | | | | | | | | | * gl/lib/regcomp.c.diff: Remove file, now that gnulib's regcomp.c compiles regex.c with -Wno-unused-parameter. * gl/lib/regex_internal.c.diff: This file induced a change to ensure that the "Idx" type was unsigned and to remove a few "VAR < 0" comparisons. These days, it is probably fine to stay in sync with gnulib/glibc's copies of these files, so remove these patches, too. * gl/lib/regexec.c.diff: Likewise. Prompted by a report by Assaf Gordon and a suggestion from Paul Eggert.
* tests: colors: fix a portability problem and work around a shell bugJim Meyering2016-07-311-17/+17
| | | | | | | | | | * tests/colors (e): Fix a portability bug: use printf '\033' rather than '\e' to generate the required byte sequence, since for some shells (at least dash 0.5.8), the latter doesn't work. Work around a shell bug whereby "local tab=$(printf '\t')" would result in an empty value for "$tab": hoist each "tab" definition up/out of its function to global scope. Reported by Assaf Gordon in http://debbugs.gnu.org/24116#8
* gnulib: update to latest; and tests/init.shJim Meyering2016-07-232-14/+17
| | | | | * gnulib: Update to latest. * init.sh: Update from gnulib.
* maint: arrange for "make distcheck" to work with unreleased automakeJim Meyering2016-05-301-0/+1
| | | | | * dist-check.mk (my-distcheck): Remove all .deps directories before performing the recursive comparison.
* doc: fix a reference to emacs' emerge nodeGlenn Morris2016-05-241-1/+1
| | | | | | * doc/diffutils.texi (Interactive Merging): Correct a reference to emacs' emerge node: s/emerge/Emerge/. This addresses http://debbugs.gnu.org/23613
* maint: arrange for better URLs in generated announcement messageJim Meyering2016-04-301-0/+4
| | | | | * cfg.mk (url_dir_list): Define. I had been correcting the generated URLs by hand, just before the announcement. This is better.
* maint: don't ignore gitlog-to-changelog failureJim Meyering2016-03-151-3/+3
| | | | | * Makefile.am (gen-ChangeLog): Don't ignore failure of gitlog-to-changelog. This syncs to coreutils' copy of this rule.
* diff: --color: fix an infinite recursion bugGiuseppe Scrivano2016-03-064-2/+25
| | | | | | | | | | | | | | | * src/diff.h (presume_output_tty): New extern variable. * src/diff.c (PRESUME_OUTPUT_TTY_OPTION): New enum. (group_format_option): Add '-presume-output-tty'. (main): Handle PRESUME_OUTPUT_TTY_OPTION. * src/util.c: New variable `presume_output_tty'. (check_color_output): Handle presume_output_tty. (set_color_context): Call process_signals only when color_context is not RESET_CONTEXT. * tests/colors: Check that diff doesn't crash when interrupted in the middle of a color sequence. Reported by Gisle Vanem in http://debbugs.gnu.org/22067