| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
* cfg.mk (exclude_file_name_regexp--sc_space_tab): ...define this.
|
|
|
|
| |
* cfg.mk (config-save): Fix typo: add leading "_" in variable name.
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
| |
* doc/diff.texi (diff Options): Document -L.
|
|
|
|
| |
* src/diff.c (option_help_msgid): Document -L.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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/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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
* tests/Makefile.am (TESTS): Fix typo: s/jESTS/TESTS/
|
| |
|
|
|
|
|
| |
* src/diff.c (specify_value): Use !STREQ(...), not strcmp(...) != 0.
* src/diff3.c (main): Likewise.
|
|
|
|
| |
Run "make update-copyright", so "make syntax-check" works in 2011.
|
| |
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
* HACKING: New file, copied 99% from the one in grep's repository.
|
|
|
|
|
| |
* README: Mention coreutils' long-standing policy on use of M-N
ranges in copyright year lists. Requested by Richard Stallman.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
* src/dir.c (diff_dirs): Rename shadowed local cmp to "c".
|
|
|
|
|
|
| |
* bootstrap.conf (gnulib_modules): Use gettext-h, not gettext.
The latter is overkill for a package that uses
AM_GNU_GETTEXT([external]...
|
|
|
|
|
| |
* bootstrap: Update from gnulib.
* tests/init.sh: Likewise.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* src/sdiff.c: Remove #if-!HAVE_SIGPROCMASK-guarded code.
* bootstrap.conf (gnulib_modules): Add sigprocmask.
|
|
|
|
|
| |
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.
|