| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
* configure.ac: Increase designated gettext version to 0.19.2
* bootstrap.conf (buildreq): Likewise.
Remove now-unnecessary code to remove gettext-provided files.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Run "make update-copyright" and then...
* gnulib: Update to latest.
* tests/init.sh: Update from gnulib.
* bootstrap: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Normally, it is safe to assume two regular files are different when
their st_size values are different. However, that assumption may
be invalid if either value is zero, as happens with files on Linux
/proc and /sys file systems. Since skipping this optimization will
usually cost very little (one read syscall, to read zero bytes),
it is fine to accommodate those unusual files.
* src/analyze.c (diff_2_files): Do not assume regular files differ
just because their st_size values differ when one or more is 0.
* src/diff.c (compare_files): Likewise.
* tests/brief-vs-proc-stat-zero: New test.
* tests/Makefile.am: Add it.
* NEWS (Bug fixes): Describe it.
Reported by Stephan Müller in http://debbugs.gnu.org/21942
|
|
|
|
|
|
|
|
|
| |
I noticed that when a test was skipped, the reason was not printed.
This fixes it. In coreutils, this variable is set in init.cfg,
but there is no point in putting the definition so far from the
code that chooses the file descriptor number in tests/Makefile.am.
* tests/Makefile.am (TESTS_ENVIRONMENT) [stderr_fileno_]: Define
here (to 9), right next to the companion "9>&2".
|
|
|
|
|
| |
* bootstrap.conf (buildreq): Add gperf to the list.
Reported by Stephan Müller in http://debbugs.gnu.org/21945
|
|
|
|
|
| |
* tests/colors: New file.
* tests/Makefile.am (TESTS): Add colors.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bootstrap (gnulib_modules): Add 'argmatch'.
* doc/diffutils.texi: Add documentation for --palette
* src/diff.h (set_color_palette): New prototype.
* src/diff.c (set_color_palette): New function.
(color_palette): New variable.
* src/utils.c: Include "argmatch.h".
(struct bin_str): New struct.
(struct color_ext_type): New struct.
(color_indicator): New array.
(indicator_name): New array.
(indicator_no): New enum.
(parse_state): New enum.
(put_indicator): New function.
(get_funky_string): New function. Copied from coreutils ls.
(parse_diff_color): New function. Copied from coreutils ls
"parse_ls_color" function.
(set_color_context): Use put_indicator instead of directly
outputting the sequence.
* po/POTFILES.in: Add 'lib/argmatch.c'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/diffutils.texi (diff Options): Add documentation for --color.
Copied from coreutils ls --color.
* src/context.c (pr_unidiff_hunk): Set the color context.
(print_context_header): Likewise.
(pr_context_hunk): Likewise.
* src/diff.h (enum colors_style): New enum to record when to use colors.
(colors_style): New variable to memorize the argument value.
(set_color_context): Add function definition.
* src/diff.c: : Define COLOR_OPTION.
(specify_colors_style): New function.
(longopts): Add --color.
(main): Handle --color argument.
(option_help_msgid): Add usage string for --color.
* src/normal.c (print_normal_hunk): Set the color context.
* src/side.c (print_1sdiff_line): Likewise.
* src/util.c (print_1_line_nl): New function.
(print_1_line): Make it a wrapper of 'print_1_line_nl'.
(colors_enabled): New boolean variable.
(begin_output): Call check_color_output once the output file is
configured.
(output_1_line): Periodically call `process_signals'.
(caught_signals): New sigset_t.
(colors_enabled): New boolean variable.
(interrupt_signal): New sig_atomic_t.
(stop_signal_count): New sig_atomic_t.
(check_color_output): New function.
(install_signal_handlers): Likewise. Copied from coreutils ls.
(process_signals): Likewise. Copied from coreutils ls.
(set_color_context): New function.
(sighandler): Likewise. Copied from coreutils ls.
(stophandler): Likewise. Copied from coreutils ls.
|
|
|
|
| |
* src/diff.c (option_help_msgid): Improve help text of option --label.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The PATH was set incorrectly, so that the diff used by
help2man was the one from $PATH, rather than the just-built
one.
* man/Makefile.am (bin_dir): New variable, to...
(dist_man1_MANS): ...prepend ../src to PATH, not just "..".
Also, add a test to ensure that each $(bin_dir)/$$base is
executable, so this doesn't happen again.
In http://debbugs.gnu.org/21023, Rodrigo Valiña
Gutiérrez reported that diff.1 from the diffutils-3.3 tarball
contained no description of the then-new --no-dereference option.
|
|
|
|
|
| |
* doc/diffutils.texi (Comparing Directories): Correct grammar.
(diff Options) [--no-dereference]: Say a little more.
|
| |
|
|
|
|
|
|
|
|
|
| |
This fixes the problem that 'diff - file' and 'cat file | diff - file'
fail due to a seek failure with a message 'diff.exe: -: Invalid seek',
because seek does not work on stdin and a pipe on OS/2 kLIBC.
* src/io.c (sip): Set skip_test to true if seek is not possible on
OS/2 kLIBC.
|
| |
|
|
|
|
|
|
| |
* man/Makefile.am (dist_man1_MANS): On OS/2, PATH_SEPARATOR is ';',
but unquoted, that is interpreted as the shell's statement
terminator. Quote it.
|
|
|
|
|
|
|
| |
Reported by Tobias Stoeckmann in: http://bugs.gnu.org/18857
* src/diff.c (main): Don't overflow if INTMAX_MAX / 2 < tabsize.
* tests/bignum: New file, to test for this bug.
* tests/Makefile.am (TESTS): Add it.
|
| |
|
|
|
|
|
|
|
|
| |
Reported by Navin Kabra via Eric Blake in:
http://bugs.gnu.org/18402
* src/util.c (analyze_hunk): Don't mishandle incomplete
lines at end of file.
* tests/no-newline-at-eof: Test for the bug.
|
|
|
|
|
|
|
| |
* src/io.c (find_identical_ends): Fix performance bug:
the test for when the prefix was needed messed up by
the 2002-02-28 integer-overflow fixes, causing performance to be
worse than it needed to be.
|
| |
|
|
|
|
| |
* doc/diffutils.texi: Update copyright.
|
|
|
|
|
|
| |
* README: Change bug-gnu-utils@... to bug-diffutils@gnu.org.
* doc/diffutils.texi: Likewise.
Reported by Jamie Landeg Jones.
|
|
|
|
| |
* src/diff.c (option_help_msgid): Remove two "..." typos (Bug#17102).
|
|
|
|
|
|
|
| |
See Bug#17075.
* doc/diffutils.texi (Comparison): Say that files need not be read.
(Invoking diff): Remove confusing remark about 'diff - -'.
It's not that useful, and it's not portable anyway.
|
|
|
|
|
|
|
|
|
|
| |
* src/context.c (find_hunk):
Simplify, now that 2 * context + 1 cannot overflow.
* src/diff.c (main):
* src/sdiff.c (interact):
Don't rely on undefined behavior on signed integer overflow.
* src/diff.c (main): Don't let contexts exceed CONTEXT_MAX.
* src/system.h (CONTEXT_MAX): New macro.
|
|
|
|
|
|
|
|
| |
Problem reported by Vincent Lefevre in <http://bugs.gnu.org/16864>.
* src/context.c (find_hunk): Threshold is CONTEXT only if
the second change is ignorable.
* tests/ignore-matching-lines: New test.
* tests/Makefile.am (TESTS): Add it.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem reported by Vincent Lefevre in <http://bugs.gnu.org/16848>.
The simplest solution is to remove the TOO_EXPENSIVE heuristic
that I added to GNU diff in 1993. Although appropriate for
circa-1993 hardware, these days the heuristic seems to be more
trouble than it's worth.
* NEWS: Document this.
* doc/diffutils.texi (Overview): Modernize citations.
Remove mention of TOO_EXPENSIVE heuristic.
* src/analyze.c (diff_2_files): Adjust to TOO_EXPENSIVE-related
API changes in gnulib's diffseq module.
|
| |
|
|
|
|
|
|
|
|
|
| |
Problem reported by Vincent Lefevre in <http://bugs.gnu.org/16608>.
* NEWS:
* doc/diffutils.texi (Binary, Invoking diff): Document this.
* src/analyze.c (briefly_report): Return void, not int.
All uses changed. Do not futz with exit status. Simplify.
* tests/binary: Adjust to match new behavior.
|
|
|
|
|
|
| |
* configure.ac (WARN_CFLAGS): Omit -Wsuggest-attribute=pure
when compiling the lib subdirectory. Reported for Fedora 19
by Eric Blake in <http://bugs.gnu.org/15463>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On my platform (AMD Phenom II X4 910e, Fedora 17 x86-64), this sped up
'cmp -n 8GiB /dev/full /dev/zero' by a factor of 3.8, and
'cmp -sn 8GiB /dev/full /dev/zero' by a factor of 1.8.
* bootstrap.conf (gnulib_modules): Add rawmemchr.
* src/cmp.c (cmp): Optimize the common case where buffers are the same,
by using count_newlines rather than block_compare_and_count.
(block_compare_and_count): Remove.
(count_newlines): New function.
* src/cmp.c (count_newlines):
* src/io.c (prepare_text):
* src/sdiff.c (lf_copy, lf_skip, lf_snarf):
Use rawmemchr instead of memchr, for speed.
|
|
|
|
|
|
|
| |
Performance problem reported by David Balažic in:
http://lists.gnu.org/archive/html/bug-diffutils/2013-08/msg00013.html
* src/system.h (word): Make it size_t, not uintmax_t.
This sped up plain cmp 90% on my tests (GCC 4.8.1, x86).
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The future major Automake version (2.0, ETA at least one year from now)
might enable that option unconditionally, so better get prepared in due
time.
* configure.ac (AM_INIT_AUTOMAKE): Adjust.
(AM_PROG_CC_C_O): New, required by Automake up to 1.13.x when the
'subdir-objects' is in use.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem reported by Errembault Philippe in:
http://lists.gnu.org/archive/html/bug-diffutils/2013-03/msg00012.html
* NEWS: Document this.
* src/dir.c (compare_names): Fall back on file_name_cmp if
compare_collated returns 0, unless ignoring file name case.
(diff_dirs): Don't bother with the O(N**2) stuff unless ignoring
file name case.
* tests/Makefile.am (TESTS): Add strcoll-0-names.
* tests/strcoll-0-names: New file.
|
|
|
|
|
| |
* src/dir.c (compare_names_for_qsort): Remove declaration.
Not needed now that we assume C89.
|
|
|
|
|
|
|
|
| |
* src/dir.c (compare_collated): New function.
(compare_names): Use it.
(compare_names_for_qsort): Use it. This is a bit more efficient
as it can avoid a double invocation of file_name_cmp when
file_name_cmp returns zero.
|
|
|
|
|
|
|
| |
* NEWS (New feeatures): Update 3.3's news to mention --no-dereference.
Reported by Denis Excoffier.
* Makefile.am (old_NEWS_hash): Update, since this modifies old, and
normally-immutable NEWS.
|
|
|
|
|
|
|
| |
* tests/Makefile.am (TESTS_ENVIRONMENT):
Use "FOO=val; export FOO" rather than "export FOO=val",
as the latter form doesn't work with Solaris /bin/sh.
Problem found when trying to run "make check" on Solaris 10.
|
|
|
|
|
|
| |
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
|
|
|
|
| |
* NEWS: Record release date.
|
|
|
|
|
| |
* doc/diffutils.texi (Comparing Three Files): Fix out-of-order menu.
Bug caught by Texinfo 5.0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bootstrap.conf (gnulib_modules): Add vararrays.
(needed_gnulib_files, unnecessary_gettext_files): New vars.
(bootstrap_post_import_hook): New function, to implement these vars.
(excluded_files): Remove; 'bootstrap' no longer supports this.
Its function is now performed by unnecessary_gettext_files.
(buildreq): Update automake to 1.12.2, to avoid CVE-2012-3386.
* configure.ac (AM_GNU_GETTEXT_VERSION): Bump from 0.17 to 0.18.2,
to lessen the probability that we'll have outlandishly old files
during a build.
* m4/vararrays.m4: Remove from repository, as we now use the
gnulib version.
|
|
|
|
|
|
|
|
|
|
| |
Blindly updating to the latest from gnulib, bootstrap would
fail due to failure of our local patches to apply. Hence,
these first two updates.
* gl/lib/regex_internal.c.diff: Update offsets, so this patch
applies to the latest from gnulib.
* gl/lib/regex_internal.h.diff: Remove file. No longer needed.
* bootstrap: Update from gnulib.
|
|
|
|
|
| |
* tests/Makefile.am (built_programs): Don't assume fmt works.
Don't rely on 'make -C', either.
|
|
|
|
| |
* .gitignore: Add tests/*.trs and several *.h and *.sed files in lib,
|