25 Commits

Author SHA1 Message Date
Collin Funk
1d2456f539 maint: import tests/init.sh from Gnulib during bootstrap
* bootstrap.conf (bootstrap_post_import_hook): Use gnulib-tool
--copy-file to import tests/init.sh.
* tests/init.sh: Remove file.
* .gitignore (/tests/init.sh): Add entry.
2024-07-04 13:15:35 -07:00
Paul Eggert
54c8930ca5 maint: update .gitignore to add lib/stdbit.h 2024-06-19 23:42:53 -04:00
Paul Eggert
14a167f8d4 maint: update .gitignore
* .gitignore: Remove lib/charset.alias, lib/configmake.h,
lib/ref-add.sed, lib/ref-del.sed.  Add lib/c-file-type.c,
lib/file-type.h.  Sort.
2023-08-15 10:41:54 -07:00
Paul Eggert
6bf2c33ea4 diff: use openat, fstatat when recursive
This should improve performance when doing recursive comparisons.
Currently there is no attempt to avoid file descriptor exhaustion,
just as previously there is no attempt to avoid file names
that provoke ENAMETOOLONG.  Because of this change, ‘diff - A/B’
now works correctly when standard input is a directory.
* .gitignore: Add lib/dirent.h.
* bootstrap.conf (gnulib_modules): Add fdopendir.
* src/diff.c (main): Initialize noparent’s desc to AT_FDCWD.
(compare_files): Use fstatat with parent directory’s file
descriptor and relative name, instead of lstat or stat.
Likewise for openat and open.
* src/diff.h (struct file_data): New member ‘dirstream’.
(struct comparison): The ‘parent’ member is now &noparent (instead
of null) if there is no parent.  All uses changed.
(curr): New toplevel variable, replacing ‘files’.  All uses changed.
* src/dir.c: Include dirname.h, for last_component.
(dir_read): New arg PARENTDIRFD.  Arg DIR is no longer
pointer-to-const since DIR->desc and DIR->dirstream are now
updated.  Use PARENTDIRFD to open the directory via
opendat+fdopendir instead of via opendir.  Update new dirstream
component instead of closing the directory, since it’s now the
caller’s responsibility to close the directory because callers now
want the file descriptor.  All callers changed.
(diff_dirs): First arg CMP is no longer pointer-to-const since
CMP->file is updated by dir_read.  All callers changed.
(find_dir_file_pathname): First arg is now struct file_data *,
not merely a file name.  All callers changed.
* tests/stdin: Test new behavior when stdin is a directory.
2023-07-18 20:07:13 -07:00
Paul Eggert
e9a55a8edc maint: update .gitignore 2023-07-09 01:19:45 -07:00
Paul Eggert
ec4a3c07ba maint: update .gitignore
* .gitignore: Add *.rej (for 'patch'), lib/error.c.
2023-06-06 14:35:21 -07:00
Paul Eggert
a2e301b52c diff: switch from wchar_t to char32_t
Prefer C11-style char32_t to wchar_t, as char32_t works better on
platforms where wchar_t is only 16 bits.
* .gitignore: Add lib/uchar.h.
* bootstrap.conf (gnulib_modules): Add c32width, mbrtoc32.
Remove mbrtowc.  Sort.
* src/side.c: Include uchar.h instead of wchar.h.
(print_half_line): Use c32width and mbrtowc instead of
wcwidth and mbrtowc.
2023-06-06 14:35:21 -07:00
Paul Eggert
6351be27c3 maint: update .gitignore
.gitignore: Update for some recent changes, and simplify.
2023-02-10 15:44:38 -08:00
Paul Eggert
4befe0a802 maint: .gitignore updates
* .gitignore: Remove lib/unused-parameter.h.  Add all of m4, since
no files there need to be committed; this lets us remove
m4/.gitignore and m4/gnulib-cache.m4.  Add *.orig, *.patch, .Tpo,
/*.diff, lib/*/ (which lets us remove /lib/sys/), lib/ctype.h,
lib/errno.h, lib/float.h, lib/fnmatch.h, lib/getopt-cdefs.h,
lib/getopt.h, lib/limits.h, lib/sigsegv.h, lib/stdalign.h,
lib/stdarg.h, lib/stdbool.h, lib/stddef.h, lib/stdint.h,
lib/stdopen.[ch], vc-dwim-log-*.  Add slashes to autom4te.cache,
build-aux.  Remove redundant initial slashes from patterns that
also have internal slashes.  Remove plain ABOUT-NLS, since
/ABOUT-NLS suffices.  Sort using LC_ALL=C.
2021-08-22 14:02:21 -07:00
Paul Eggert
c65f4d64b1 maint: ignore ‘configure’ temporaries
* .gitignore: Ignore confdefs*, conftest*.
2019-07-19 14:11:10 -07:00
Jim Meyering
88d911dbc7 build: ignore texinfo build artifacts
* .gitignore: Ignore texinfo artifacts in doc/.
2016-08-13 21:46:49 -07:00
Paul Eggert
118d732ab2 maint: update .gitignore for recent gnulib
* .gitignore: Add tests/*.trs and several *.h and *.sed files in lib,
2013-01-06 08:25:34 -08:00
Paul Eggert
98985d3206 maint: m4/gnulib-cache.m4 is not under version control
This is like what coreutils does, and suppresses 'git status' chatter.
* .gitignore: Add /m4/gnulib-cache.m4.
2012-05-14 23:08:59 -07:00
Paul Eggert
aa7a1de25a build: update gnulib submodule to latest 2012-05-14 10:15:56 -07:00
Paul Eggert
e3001b775a * .gitignore: Add lib/unistr, lib/unused-parameter.h. 2011-08-13 13:17:40 -07:00
Jim Meyering
7faccb437c build: ccache works better without embedded version strings
* src/Makefile.am: Generate version.c and version.h and put the
new symbol in a tiny library to be used by each program.
(LDADD): Add the new library.
* src/cmp.c (main): Use Version, not PACKAGE_VERSION, so the .o
file does not change with each commit-derived version increment.
* src/diff.c (main): Likewise.
* src/diff3.c (main): Likewise.
* src/sdiff.c (main): Likewise.
* src/system.h: Include "version.h".
* .gitignore: Add version.[ch]
2011-06-13 09:17:15 +02:00
Jim Meyering
df0a31f611 doc: rename diff.texi to diffutils.texi
This makes the .texi basename the same as the package name,
which is consistent with most other GNU packages.
* doc/diffutils.texi: Rename from...
* doc/diff.texi: ...removed.
* doc/Makefile.am (info_TEXINFOS): Reflect name change.
(diffutils_TEXINFOS): Likewise.
* cfg.mk (gendocs_options_): Remove this customization.  It is no
longer needed, now that the .texi name matches that of the package.
* man/Makefile.am ($(dist_man1_MANS)): Remove now-unnecessary sed
filter.
* README: Update references to diffutils.texi etc. here, too.
* .gitignore: Update here, too.
Suggested by Karl Berry.
2011-06-12 09:47:27 +02:00
Jim Meyering
39213a3bbc maint: use gnulib's new readme-release module
* bootstrap.conf (gnulib_modules): Add readme-release.
(bootstrap_epilogue): Add the recommended perl one-liner.
* README-release: Remove file; it is now generated from gnulib.
* .gitignore: Add it.
2011-05-18 20:31:42 +02:00
Jim Meyering
4065b154b0 build: include cfg.mk and dist-check.mk in the distribution tarball
* Makefile.am (EXTRA_DIST): Add cfg.mk and dist-check.mk.
2010-04-08 11:09:51 +02:00
Eric Blake
eb7d0cc491 maint: ignore generated files
* .gitignore: Ignore recent gnulib additions.
2010-04-06 10:11:35 -06:00
Jim Meyering
f51320402b maint: add to .gitignore
* .gitignore: Ignore more.
2010-01-17 11:16:24 +01:00
Eric Blake
4c048db1c7 build: ignore more files
* .gitignore: Add config.cache, *.exe.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-11-20 14:55:05 -07:00
Jim Meyering
5f93400251 admin: ignore all of gnulib-tests
* .gitignore: Add gnulib-tests
2009-11-16 22:40:47 +01:00
Jim Meyering
e454c1471a tests: add the first script; hook up gnulib-tests
* configure.ac (AC_CONFIG_FILES): Add tests/Makefile and
gnulib-tests/Makefile.
* tests/help-version: New file, from coreutils.
* tests/test-lib.sh: Likewise.
* tests/Makefile.am: New file, from gzip.
* Makefile.am (SUBDIRS): Add tests and gnulib-tests.
* tests/t-local.sh: New, empty(for now) file.
2009-11-14 11:16:20 +01:00
Jim Meyering
8356d90250 maint: tell git what it can ignore
* .gitignore: Ignore generated files.
2009-11-12 08:19:53 +01:00