diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2014-02-21 17:57:26 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2014-02-22 08:13:30 +0200 |
commit | 93906c238d9309f95afeddfa9ac8d7ce92351e70 (patch) | |
tree | 5fe53b70287797abf5cdc1a91daf568c5c1dcb02 /src/incremen.c | |
parent | 9df17e6005e7a333399e3dc21a7afec75565c767 (diff) | |
download | tar-93906c238d9309f95afeddfa9ac8d7ce92351e70.tar.gz |
Support exclusion patterns from various VCS ignore lists.
* src/Makefile.am (tar_SOURCES): Add exclist.c
* src/common.h (EXCL_DEFAULT, EXCL_RECURSIVE)
(EXCL_NON_RECURSIVE): New flags.
(excfile_add, info_attach_exclist)
(info_cleanup_exclist,info_free_exclist)
(exclude_vcs_ignores): New prototypes.
* src/create.c (dump_dir0): Call info_attach_exclist.
* src/exclist.c: New file.
* src/incremen.c (scan_directory): Call info_attach_exclist.
* src/names.c (excluded_name): Moved to exclist.c. Change signature.
All uses updated.
* src/tar.c: New options: --exclude-ignore, --exclude-ignore-recursive
and --exclude-vcs-ignores.
(tar_stat_destroy): Free exclist.
* src/tar.h (tar_stat_info): New member exclude_list.
* NEWS: Document new exclusion options.
* doc/tar.texi: Likewise.
* doc/tar.1: Likewise.
Diffstat (limited to 'src/incremen.c')
-rw-r--r-- | src/incremen.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/incremen.c b/src/incremen.c index 884d2fa2..b1b70ba4 100644 --- a/src/incremen.c +++ b/src/incremen.c @@ -734,6 +734,8 @@ scan_directory (struct tar_stat_info *st) if (! dirp) savedir_error (dir); + info_attach_exclist (st); + tmp = xstrdup (dir); zap_slashes (tmp); @@ -762,7 +764,7 @@ scan_directory (struct tar_stat_info *st) if (*entry == 'I') /* Ignored entry */ *entry = 'N'; - else if (excluded_name (full_name)) + else if (excluded_name (full_name, st)) *entry = 'N'; else { |