| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
now that those are supplied automatically via gnulib's maint.mk.
* README-release: sync with coreutils.
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
|
|
|
|
| |
* NEWS: Record release date.
|
| |
|
|
|
|
|
| |
* bootstrap.conf (gnulib_modules): Use gnulib's sys_wait module,
now that we assume its presence.
|
|
|
|
|
| |
* bootstrap: Also update from gnulib.
* tests/init.sh: Likewise
|
|
|
|
|
|
| |
* 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/no-newline-at-eof: Revert to the smaller test, but with
-U1 rather than -U2, since that actually triggers the bug.
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
| |
* tests/no-newline-at-eof: New file.
* tests/Makefile.am (TESTS): Add it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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/init.sh: Update from gnulib.
|
|
|
|
| |
* Makefile.am (EXTRA_DIST): Add cfg.mk and dist-check.mk.
|
|
|
|
|
|
| |
* cfg.mk (sc_cross_check_PATH_usage_in_tests): Remove rule,
now that it's in gnulib's maint.mk.
* gnulib: Update to latest.
|
|
|
|
|
| |
* cfg.mk (sc_cross_check_PATH_usage_in_tests): Use grep's -x (match
entire line) option with -F.
|
|
|
|
|
|
| |
* tests/help-version: Update from gzip.
* Makefile.am (TESTS_ENVIRONMENT): Export VERSION,
as required for this new help-version script.
|
|
|
|
|
| |
* cfg.mk (sc_cross_check_PATH_usage_in_tests): New rule, that is
useful only in conjunction with the help-version script.
|
|
|
|
|
|
|
|
| |
* tests/basic: Likewise.
* tests/binary: Likewise.
* tests/function-line-vs-leading-space: Likewise.
* tests/label-vs-func: Likewise.
* tests/stdin: Likewise.
|
|
|
|
| |
* .gitignore: Ignore recent gnulib additions.
|
|
|
|
| |
* bootstrap: Copy from gnulib/build-aux.
|
|
|
|
| |
* tests/init.sh: Update from gnulib.
|
|
|
|
| |
* cfg.mk (local-checks-to-skip): Add new sc_texinfo_acronym, to skip it.
|
|
|
|
|
| |
* src/context.c: Include "c-ctype.h".
Use c_isspace, not isspace.
|
|
|
|
|
| |
* tests/function-line-vs-leading-space: New file.
* tests/Makefile.am (TESTS): Add it.
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* bootstrap.conf (buildreq): Bootstrap can't deal with it,
perhaps because the command name contains a digit.
|
|
|
|
| |
* bootstrap.conf (buildreq): Add help2man.
|
|
|
|
|
| |
* tests/binary: New script.
* tests/Makefile.am (TESTS): Add it.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
|
|
|
|
| |
* NEWS: Record release date.
|
|
|
|
| |
* README-release: New file.
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
| |
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/basic: Enable "set -x" if $VERBOSE.
* tests/help-version: Likewise.
* tests/label-vs-func: Likewise.
* tests/stdin: Likewise.
|
| |
|
|
|
|
|
| |
* gl/lib/regcomp.c.diff: Adjust to apply to the latest in gnulib.
* gnulib: Update submodule to latest.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
* .gitignore: Ignore more.
|
|
|
|
| |
* TODO: Add an item, suggested by Dan Jacobson.
|
|
|
|
|
| |
* tests/stdin: New test.
* tests/Makefile.am (TESTS): Add it.
|
|
|
|
|
|
| |
* cfg.mk: Include dist-check.mk, from coreutils.
* Makefile.am (distcheck-hook): Define rule, to hook to...
* dist-check.mk: New file.
|
| |
|
|
|
|
| |
* cfg.mk (old_NEWS_hash): Update to account for GFDL change.
|
| |
|
|
|
|
|
| |
* tests/basic: Start adding tests.
* tests/Makefile.am (TESTS): Add it.
|