summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* * .x-sc_space_tab: Remove file. Instead, ...Jim Meyering2011-03-262-1/+2
| | | | * cfg.mk (exclude_file_name_regexp--sc_space_tab): ...define this.
* maint: fix typo in unused ruleJim Meyering2011-03-261-1/+1
| | | | * cfg.mk (config-save): Fix typo: add leading "_" in variable name.
* doc: add a reference to wdiff(1) from diff.1Jim Meyering2011-03-182-3/+8
| | | | | | | | * man/diff.x: New file, to add "SEE ALSO" reference to wdiff(1). * man/Makefile.am (diff.1): Depend on diff.x. ($(dist_man1_MANS)): Tell help2man to include diff.x. (EXTRA_DIST): Add diff.x. Suggestion from Dan Jacobson in http://bugs.debian.org/613319
* docs: info should mention -LEric Blake2011-03-181-1/+2
| | | | * doc/diff.texi (diff Options): Document -L.
* docs: diff --help should mention -LEric Blake2011-03-181-1/+1
| | | | * src/diff.c (option_help_msgid): Document -L.
* doc: speak of the --test (-a) option, not "the -a or --test option"Jim Meyering2011-02-151-83/+87
| | | | | | | | | | | | | | Convert using this command: perl -pi -e \ 's/(\@option{-.}) or (\@option{--.*?}) option/$2 ($1) option/' \ doc/diff.texi Then convert some more with this: perl -pi -e \ 's/the (\@option{-.}) or (\@option{--.*?})$/the $2 ($1)/' \ doc/diff.texi Then convert more manually. Suggested by Dan Jacobson
* maint: remove all uses of vfork: use fork insteadJim Meyering2011-01-245-53/+14
| | | | | | | | | | | | | Our use of vfork now provokes warnings from gcc-4.6.0. Also, vfork is no longer even specified by POSIX.1-2008. * src/diff3.c (read_diff): Change each use of vfork to "fork". Remove #ifdef'd code. * src/util.c (begin_output, finish_output): Likewise. * src/sdiff.c (cleanup, main, edit): Likewise. (handler_index_of_SIGPIPE): Remove now-unused definition. * src/system.h: Don't include <vfork.h>. (vfork): Remove definition. * ms/config.site: Remove reference to vfork cache variable.
* tests: avoid newer but less-portable tail option syntaxJim Meyering2011-01-241-1/+1
| | | | | | * tests/function-line-vs-leading-space: Use sed -n '3,$p' rather than tail -n+3. Older versions of tail do not accept that newer syntax. Reported by Sudhakara Peram.
* tests: fix an erroneous testJim Meyering2011-01-241-4/+4
| | | | | | | | | | | | On most systems, like-named files were compared, by luck. However, on others, different-named files would be compared since their names were being treated as equal -- but they had different content, so the test would fail. * tests/colliding-file-names: Use different sets of file names in d1 and d2 so that they cannot accidentally match. Put the same line in each test file. This is required when files named e.g., abc and ABC are compared. This test was failing on a NixOS 86_64-darwin system.
* build: update gnulib submodule to latestJim Meyering2011-01-241-0/+0
|
* tests: fix typo that silently disabled all testsJim Meyering2011-01-241-1/+3
| | | | * tests/Makefile.am (TESTS): Fix typo: s/jESTS/TESTS/
* build: update gnulib submodule to latestJim Meyering2011-01-231-0/+0
|
* maint: avoid new syntax-check failureJim Meyering2011-01-232-2/+2
| | | | | * src/diff.c (specify_value): Use !STREQ(...), not strcmp(...) != 0. * src/diff3.c (main): Likewise.
* maint: update copyright year ranges to include 2011Jim Meyering2011-01-0345-45/+45
| | | | Run "make update-copyright", so "make syntax-check" works in 2011.
* build: update gnulib submodule to latestJim Meyering2011-01-031-0/+0
|
* bootstrap: adjust to recent gnulib changesPaul Eggert2010-12-161-2/+0
| | | | | | * bootstrap.conf (excluded_files): Do not exclude m4/size_max.m4 and m4/xsize.m4 when using an external gettext, since they are now needed by other gnulib modules.
* doc: add contributor guidelines: HACKINGJim Meyering2010-12-161-0/+591
| | | | * HACKING: New file, copied 99% from the one in grep's repository.
* maint: describe policy on copyright year number rangesJim Meyering2010-10-091-12/+9
| | | | | * README: Mention coreutils' long-standing policy on use of M-N ranges in copyright year lists. Requested by Richard Stallman.
* maint: adjust init.sh use to conformJim Meyering2010-09-049-18/+9
| | | | | | | | | | | | | * tests/help-version: Use one line: "${srcdir=.}/init.sh"; ... * tests/basic: Likewise. * tests/binary: Likewise. * tests/colliding-file-names: Likewise. * tests/excess-slash: Likewise. * tests/function-line-vs-leading-space: Likewise. * tests/help-version: Likewise. * tests/label-vs-func: Likewise. * tests/no-newline-at-eof: Likewise. * tests/stdin: Likewise.
* maint: avoid shadowing warningJim Meyering2010-09-041-3/+3
| | | | * src/dir.c (diff_dirs): Rename shadowed local cmp to "c".
* build: use gettext-h, not gettextJim Meyering2010-09-041-1/+1
| | | | | | * bootstrap.conf (gnulib_modules): Use gettext-h, not gettext. The latter is overkill for a package that uses AM_GNU_GETTEXT([external]...
* build: update build/test tools from gnulibJim Meyering2010-09-042-47/+104
| | | | | * bootstrap: Update from gnulib. * tests/init.sh: Likewise.
* build: update gnulib submodule to latestJim Meyering2010-09-041-0/+0
|
* diff -r: avoid printing excess slashes in concatenated file namesJim Meyering2010-08-147-17/+26
| | | | | | | | | | | | * bootstrap.conf (gnulib_modules): Add filenamecat. * src/diff.c: Include "filenamecat.h". (compare_files): Use file_name_concat, rather than dir_file_pathname. * src/util.c (dir_file_pathname): Remove now-unused function. * src/diff.h: Remove its declaration. * tests/excess-slash: New script to test for this. * tests/Makefile.am (TESTS): Add it. Forwarded by Santiago Vila from <bugs.debian.org/586301a>, reported by Jari Aalto.
* diff: avoid spurious diffs when two distinct dir entries compare equalPaul Eggert2010-08-124-2/+65
| | | | | | | | | | | | Problem reported by Christoph Anton Mitterer in: http://lists.gnu.org/archive/html/bug-diffutils/2010-08/msg00000.html * NEWS: Mention this bug fix. * src/dir.c (compare_names_for_qsort): Fall back on file_name_cmp if two distinct entries in the same directory compare equal. (diff_dirs): Prefer a file_name_cmp match when available. * tests/Makefile.am (TESTS): New test colliding-file-names. * tests/colliding-file-names: New file.
* build: update gnulib submodule to latestJim Meyering2010-05-091-0/+0
|
* build: don't define macros that gnulib providesJim Meyering2010-05-093-28/+3
| | | | | | | | | * bootstrap.conf (gnulib_modules): Add signal, stdint. * lib/cmpbuf.c (SA_RESTART, SA_INTERRUPT): Remove definitions. (SIZE_MAX, PTRDIFF_MAX): Likewise. Include <stdint.h>. * src/system.h (WEXITSTATUS, WIFEXITED): Remove definitions. (SA_RESTART, SA_INTERRUPT): Likewise.
* build: rely on gnulib's sigprocmask moduleJim Meyering2010-05-092-23/+1
| | | | | * src/sdiff.c: Remove #if-!HAVE_SIGPROCMASK-guarded code. * bootstrap.conf (gnulib_modules): Add sigprocmask.
* doc: README-release: don't mention To:, Cc:, etc announcement headers,Jim Meyering2010-05-041-6/+2
| | | | | now that those are supplied automatically via gnulib's maint.mk. * README-release: sync with coreutils.
* maint: teach web-doc-generating code how to do its jobJim Meyering2010-05-042-0/+2
| | | | | | * cfg.mk (gendocs_options): Define, so that gendocs.sh knows the name of our texinfo source file. * gnulib: Update to latest, for new gnu-web-doc-update and maint.mk.
* doc: update release procedureJim Meyering2010-05-031-11/+14
| | | | | | * README-release: Rearrange slightly: post the announcement to Savannah first, so you can include a link to that post in the email. Sync a few details from coreutils' README-release.
* post-release administriviaJim Meyering2010-05-033-2/+5
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 3.0v3.0Jim Meyering2010-05-031-1/+1
| | | | * NEWS: Record release date.
* build: update gnulib submodule to latestJim Meyering2010-05-031-0/+0
|
* build: use gnulib's sys_wait moduleJim Meyering2010-05-011-0/+1
| | | | | * bootstrap.conf (gnulib_modules): Use gnulib's sys_wait module, now that we assume its presence.
* build: update gnulib submodule to latestJim Meyering2010-04-303-8/+10
| | | | | * bootstrap: Also update from gnulib. * tests/init.sh: Likewise
* maint: remove now-useless #if HAVE_HEADER_H guardsJim Meyering2010-04-302-11/+3
| | | | | | * src/system.h: Include <sys/wait.h> unconditionally, now that gnulib guarantees its presence. * lib/cmpbuf.c: Likewise for <unistd.h> and <inttypes.h>.
* tests: use original no-newline-at-eof test, but with -U1, not -U2Jim Meyering2010-04-171-12/+8
| | | | | * tests/no-newline-at-eof: Revert to the smaller test, but with -U1 rather than -U2, since that actually triggers the bug.
* Followon improvements for the fix for Debian bug 577832.Paul Eggert2010-04-162-20/+20
| | | | | | | * src/io.c (find_and_hash_each_line): Omit the inserted newline in a simpler way. * tests/no-newline-at-eof: Fix the test case so that it rejects the old, buggy behavior.
* build: update gnulib submodule to latestJim Meyering2010-04-161-0/+0
|
* tests: test for the no-newline-at-EOF bugJim Meyering2010-04-162-0/+55
| | | | | * tests/no-newline-at-eof: New file. * tests/Makefile.am (TESTS): Add it.
* diff: fix a regression when at least one input lacks a newline-at-EOF,Jim Meyering2010-04-162-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and the final hunk plus context-length aligns exactly with the end of the newline-lacking file. Diff would fail to output the required "\ No newline at end of file" line, thus rendering the output invalid. This bug appears to have been introduced by 2006-05-07 commit 58d0483b, "(find_identical_ends): Fix huge performance bug...", at least to the extent that reverting that change fixes the bug. Considering the stated effect of that change and lack of metrics, reverting it is not an option, so here we take a more direct approach. Given these inputs, printf '\n1'>a; printf '\n0\n\n1'>b and running diff like this: ./diff -U1 a b for input file "b", the pointer, files[1].linbuf[4][-1], to the last byte on the final line was mistakenly pointing at the sentinel newline at EOF, rather than at the preceding byte. (gdb) p files[1].linbuf[4][-1] $3 = 10 '\n' Thus, this test in the final print_1_line call: if ((!line_flag || line_flag[0]) && limit[-1] != '\n') fprintf (out, "\n\\ %s\n", _("No newline at end of file")); would fail, because limit[-1] (which is files[1].linbuf[4][-1]) was mistakenly '\n', rather than the desired '1'. My first thought was simply to adjust the final linbuf[line] setting, at the end of io.c's find_and_hash_each_line function function: if (p == bufend) - break; + { + if (current->missing_newline) + --linbuf[line]; + break; + } But that would make diff misbehave with this input (same as above, but with a newline appended to "a"), printf '\n1\n'>a; printf '\n0\n\n1'>b ./diff -U1 a b due to the block (100 lines above) that is triggered in that case (but not in the both-files-missing-newline case): if (p == bufend && current->missing_newline && ROBUST_OUTPUT_STYLE (output_style)) { /* This line is incomplete. If this is significant, put the line into buckets[-1]. */ if (ignore_white_space < IGNORE_SPACE_CHANGE) bucket = &buckets[-1]; /* Omit the inserted newline when computing linbuf later. */ p--; bufend = suffix_begin = p; } Note how "p" is decremented and "bufend" adjusted. When that happens, we certainly don't want to decrement "bufend" yet again. Since there is no other way to determine at the end whether "bufend" was already decremented, add a new variable to serve as witness. * NEWS (Bug fixes): Mention it. Reported by Timo Juhani Lindfors in http://bugs.debian.org/577832. Forwarded by Santiago Vila.
* tests: update init.sh from gnulibJim Meyering2010-04-161-3/+3
| | | | * tests/init.sh: Update from gnulib.
* build: include cfg.mk and dist-check.mk in the distribution tarballJim Meyering2010-04-082-2/+2
| | | | * Makefile.am (EXTRA_DIST): Add cfg.mk and dist-check.mk.
* maint: update to latest gnulibJim Meyering2010-04-082-20/+0
| | | | | | * cfg.mk (sc_cross_check_PATH_usage_in_tests): Remove rule, now that it's in gnulib's maint.mk. * gnulib: Update to latest.
* tests: make new PATH-crosschecking syntax-check tighterJim Meyering2010-04-071-1/+1
| | | | | * cfg.mk (sc_cross_check_PATH_usage_in_tests): Use grep's -x (match entire line) option with -F.
* tests: pull latest help-version from gzipJim Meyering2010-04-072-64/+124
| | | | | | * tests/help-version: Update from gzip. * Makefile.am (TESTS_ENVIRONMENT): Export VERSION, as required for this new help-version script.
* tests: add syntax-check rule to verify that tests use proper PATHJim Meyering2010-04-071-0/+20
| | | | | * cfg.mk (sc_cross_check_PATH_usage_in_tests): New rule, that is useful only in conjunction with the help-version script.
* tests: use path_prepend_ consistently; remove unnecessary VERBOSE checkJim Meyering2010-04-075-10/+5
| | | | | | | | * tests/basic: Likewise. * tests/binary: Likewise. * tests/function-line-vs-leading-space: Likewise. * tests/label-vs-func: Likewise. * tests/stdin: Likewise.
* maint: ignore generated filesEric Blake2010-04-061-0/+2
| | | | * .gitignore: Ignore recent gnulib additions.