summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* 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.
* maint: update to latest bootstrapEric Blake2010-04-061-22/+66
| | | | * bootstrap: Copy from gnulib/build-aux.
* tests: get latest init.sh from gnulibJim Meyering2010-04-051-4/+104
| | | | * tests/init.sh: Update from gnulib.
* build: update gnulib submodule to latest; adaptJim Meyering2010-04-052-1/+2
| | | | * cfg.mk (local-checks-to-skip): Add new sc_texinfo_acronym, to skip it.
* diff -F/-p: don't depend on locale-specific white-space definitionJim Meyering2010-04-051-2/+3
| | | | | * src/context.c: Include "c-ctype.h". Use c_isspace, not isspace.
* tests: exercise new behavior of -F REJim Meyering2010-03-182-0/+68
| | | | | * tests/function-line-vs-leading-space: New file. * tests/Makefile.am (TESTS): Add it.
* with -F or -p, emit better function lines: no leading white spaceYannick Moy2010-03-182-5/+14
| | | | | | | | | | * src/diff.c (print_context_function): For languages like Ada that allow local functions and procedures, the plain context function line may start with enough blank characters that the function name does not get completely printed in the 40 characters limit. This patch solves this problem by removing these useless initial blank characters. * NEWS (Changes in behavior): Mention this change.
* build: don't require a specific version of help2manJim Meyering2010-03-171-1/+1
| | | | | * bootstrap.conf (buildreq): Bootstrap can't deal with it, perhaps because the command name contains a digit.
* build: make bootstrap ensure that help2man is availableJim Meyering2010-03-171-0/+1
| | | | * bootstrap.conf (buildreq): Add help2man.
* tests: test for the "Binary files A and B differ" diagnosticJim Meyering2010-02-232-0/+20
| | | | | * tests/binary: New script. * tests/Makefile.am (TESTS): Add it.
* revert 2002 change that removed "Binary " from "files A and B differ"Jim Meyering2010-02-232-3/+15
| | | | | | | | | | | With this change, "printf '\0'|diff - /dev/null" now prints "Binary files - and /dev/null differ" once again. This reverts 2002-06-28 commit a352f0980, "(briefly_report): Don't say "Binary files differ", ...". * src/analyze.c (briefly_report): Do include the "Binary " prefix in the diagnostic, when !brief. * NEWS (Changes in behavior): Mention the diagnostic change. Reported by Andreas Hoenen in http://bugs.debian.org/570064.
* avoid compilation failure on systems lacking both fork and vforkJuan Manuel Guerrero2010-02-142-2/+2
| | | | | | | * src/sdiff.c [!HAVE_WORKING_FORK && !HAVE_WORKING_VFORK] (main): Pass the right number of arguments to shell_quote_copy. * src/util.c [!HAVE_WORKING_FORK && !HAVE_WORKING_VFORK] (begin_output): Likewise.
* post-release administriviaJim Meyering2010-02-113-2/+5
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 2.9v2.9Jim Meyering2010-02-111-1/+1
| | | | * NEWS: Record release date.
* doc: document the release procedureJim Meyering2010-02-111-0/+84
| | | | * README-release: New file.
* maint: change use of "|" to more maintainable "||" (no semantic change)Jim Meyering2010-02-101-1/+1
| | | | | | | | * src/analyze.c (diff_2_files): Using the "||" operator happens to be equivalent to using "|" in this case. It is also clearer and less prone to inadvertent bug introduction, in case the variable, "changes" were ever to take on a value not in {0,1}. Patch by Tim Waugh, via Mike Frysinger.
* portability: avoid "diff - ..." failure at least on *BSD and SolarisJim Meyering2010-02-101-1/+1
| | | | | | | The new "stdin" test was failing on many types of systems. * src/diff.c (compare_files): Guard use of xfreopen (NULL, "rb", ... also with O_BINARY, so as to avoid this unnecessary call on systems where it's not needed (on some it fails with "Bad address".
* tests: honor VERBOSEJim Meyering2010-02-104-6/+11
| | | | | | | * tests/basic: Enable "set -x" if $VERBOSE. * tests/help-version: Likewise. * tests/label-vs-func: Likewise. * tests/stdin: Likewise.
* build: update gnulib submodule to latestJim Meyering2010-02-051-0/+0
|
* sync with gnulibJim Meyering2010-02-053-29/+32
| | | | | * gl/lib/regcomp.c.diff: Adjust to apply to the latest in gnulib. * gnulib: Update submodule to latest.
* build: do not override gnulib-provided AM_CFLAGS optionsJim Meyering2010-02-041-1/+1
| | | | | | | | | | | | | | Avoid a warning from automake: lib/Makefile.am:23: AM_CFLAGS multiply defined in condition TRUE ... lib/gnulib.mk:30: ... `AM_CFLAGS' previously defined here lib/Makefile.am:18: `lib/gnulib.mk' included from here * lib/Makefile.am (AM_CFLAGS): Append $(WARN_CFLAGS) and $(WERROR_CFLAGS), i.e., use "+=", not "=". This was introduced via 2009-12-17 commit e58efa5b "build: enable warnings and -Werror.", but fortunately is not a bug, because the definition it would have overridden was always empty.
* maint: add to .gitignoreJim Meyering2010-01-171-0/+8
| | | | * .gitignore: Ignore more.
* doc: add to TODOJim Meyering2010-01-161-0/+5
| | | | * TODO: Add an item, suggested by Dan Jacobson.
* tests: ensure that an argument of "-" is treated as standard inputJim Meyering2010-01-132-1/+26
| | | | | * tests/stdin: New test. * tests/Makefile.am (TESTS): Add it.
* tests: now "make distcheck" runs more tests, incl. syntax-checkJim Meyering2010-01-103-0/+178
| | | | | | * cfg.mk: Include dist-check.mk, from coreutils. * Makefile.am (distcheck-hook): Define rule, to hook to... * dist-check.mk: New file.
* build: update gnulib to latest, for fixed syntax-check ruleJim Meyering2010-01-091-0/+0
|
* maint: record updated NEWS hashJim Meyering2010-01-091-1/+1
| | | | * cfg.mk (old_NEWS_hash): Update to account for GFDL change.
* build: update gnulib submodule to latestJim Meyering2010-01-091-0/+0
|
* tests: add a test of basic functionalityJim Meyering2010-01-092-0/+43
| | | | | * tests/basic: Start adding tests. * tests/Makefile.am (TESTS): Add it.