aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/tar/matching.c
Commit message (Collapse)AuthorAgeFilesLines
* Update bsdtar to 2.8.4Martin Matuska2011-07-171-281/+0
| | | | | | | | | | Use common code from lib/libarchive/libarchive_fe Approved by: kientzle MFC after: 2 weeks Notes: svn path=/head/; revision=224153
* If a file is specifically both included and excluded, then:Tim Kientzle2010-04-111-25/+26
| | | | | | | | | | | | | | | | | | * It is not extracted (because it is excluded) * If it's not present in the archive, then an error is reported (because the file was requested and not found) * If it is present in the archive, no error is reported. Previously, this would always report an error because the exclusion prevented the entry from matching the inclusion. Also, tar is now more reluctant to report unmatched inclusions. Previously, "tar x file1 'file*'" against an archive that contained a single entry "file1" would match file1 and then report an error for the second pattern because it wasn't matched. It now considers both inclusions to be matched and reports no error. Notes: svn path=/head/; revision=206487
* Fix -X.Tim Kientzle2010-04-111-1/+1
| | | | Notes: svn path=/head/; revision=206466
* Merge a bunch of refactoring from Joerg Sonnenberger toTim Kientzle2010-02-071-277/+78
| | | | | | | | | isolate common code used by tar and cpio (and useful to other libarchive clients). The functions here are prefixed with "lafe" (libarchive front-end) to indicate their use. Notes: svn path=/head/; revision=203593
* Diff reduction compared to portable bsdtar 2.8: Move theTim Kientzle2010-02-061-7/+8
| | | | | | | | program name into a global, which eliminates an extra argument from a lot of places. Notes: svn path=/head/; revision=203557
* Merge r283,r423 from libarchive.googlecode.com: Use libarchive's newTim Kientzle2009-03-081-1/+1
| | | | | | | | | archive_read_disk API to pull metadata off of disk. This removes a lot of platform-specific knowledge of things like ACLs, file flags, and extended attributes from bsdtar. Notes: svn path=/head/; revision=189514
* Fix SVN r181821 by not using FNM_LEADING_DIR whereTim Kientzle2008-08-181-1/+1
| | | | | | | it shouldn't be used. Notes: svn path=/head/; revision=181845
* Strip leading "./" or ".//" from patterns and filenamesTim Kientzle2008-08-181-3/+39
| | | | | | | | | | | | so that "./foo" matches "foo" (and vice versa). This is related to PR bin/119141. PR: bin/119141 MFC after: 4 days Notes: svn path=/head/; revision=181821
* Don't strip a leading '/' from a pattern to be matched.Tim Kientzle2008-08-171-2/+0
| | | | | | | | | | | This aligns the pattern-matching behavior with GNU tar and restores the behavior of bsdtar prior to FreeBSD 6.3. PR: bin/117909 MFC after: 3 days Notes: svn path=/head/; revision=181801
* MFp4: bsdtar 2.5.4bTim Kientzle2008-05-261-0/+23
| | | | | | | | | | | | | | | | In addition to a number of bug fixes and minor changes: * --numeric-owner (ignore user/group names on create and extract) * -S (sparsify files on extraction) * -s (regex filename substitutions) * Use new libarchive 'linkify' to get correct hardlink handling for both old and new cpio formats * Rework 'copy' test to be insensitive to readdir() filename ordering Most of the credit for this work goes to Joerg Sonnenberger, who has been duplicating features from NetBSD's 'pax' program. Notes: svn path=/head/; revision=179322
* Fix --fast-read by decrementing the remaining patterns to be matched,Tim Kientzle2008-03-181-1/+1
| | | | | | | | | | | instead of incrementing. Pointy hat: me Thanks to: Tomasz Przygoda MFC after: 3 days Notes: svn path=/head/; revision=177341
* bsdtar 2.0.23:Tim Kientzle2007-03-111-0/+6
| | | | | | | | | | | | | * New test scripts exercise some basic functionality * Most header inclusions are now protected (portability) * read.c now relies on security checks in libarchive instead of trying to do its own (optimization) * -p now enabled by default for root, add --no-same-permissions to disable it * Comments, minor style fixes. Notes: svn path=/head/; revision=167450
* Correct the copyright messages: Make this a standard vanillaTim Kientzle2007-01-091-3/+2
| | | | | | | 2-clause BSD license, update the year to 2007. Notes: svn path=/head/; revision=165913
* A handful of minor portability and style improvements.Tim Kientzle2005-03-141-0/+2
| | | | Notes: svn path=/head/; revision=143545
* Add a fallback version of fnmatch() to the bsdtarTim Kientzle2004-12-221-8/+164
| | | | | | | | | | | | source code. Include configure logic to pick up the system one when it exists and use the fallback version when it doesn't exist. Set the default for FreeBSD to use the system version. With this, bsdtar should now be quite portable. Notes: svn path=/head/; revision=139161
* A bunch of stuff from Christoph Mellon:Tim Kientzle2004-07-241-1/+1
| | | | | | | | | | | * Whitespace fixes * Check some malloc calls * Simplify long_help formatting * Spell "LINUX" -> "linux" * A few other miscellaneous style improvements Notes: svn path=/head/; revision=132616
* Augment the -T handling:Tim Kientzle2004-06-271-40/+16
| | | | | | | | | | | | | | | * Add --null option (sort #defines here) * Add process_lines function to util.c that reads newline-terminated or null-terminated lines (with self-sizing buffers, etc) and iteratively invokes a provided function. Use this to dramatically simplify: -T handling for -c, --exclude-from-file, and --include-from-file. * Add -T handling to -x (via include_from_file) Hopefully, this will fix the openoffice port and a couple of others that rely on -T and --null. Notes: svn path=/head/; revision=131176
* Add gtar-compatible -X/--exclude-fromTim Kientzle2004-06-151-0/+38
| | | | Notes: svn path=/head/; revision=130515
* Both "foo/" and "foo" should match "foo/bar", so stripTim Kientzle2004-06-021-0/+3
| | | | | | | | | trailing '/' characters on include patterns for extraction. Pointed out by: games/quakeforge port (thanks to Kris!) Notes: svn path=/head/; revision=129987
* Propagate struct bsdtar down into a lot more places.Tim Kientzle2004-05-171-6/+7
| | | | | | | Move global progname variable into struct bsdtar. Notes: svn path=/head/; revision=129317
* Add DPADD to Makefile (thanks to Andrey for pointing this out).Tim Kientzle2004-04-121-3/+0
| | | | | | | | Generally clean up Makefile, remove dmalloc references from source (there are better ways to do this than pollute the FreeBSD src tree). Notes: svn path=/head/; revision=128147
* Initial commit for bsdtar.Tim Kientzle2004-04-051-0/+243
Notes: svn path=/head/; revision=127915