example:
---------------
mkdir dirA
echo 'a' > dirA/a
echo 'a' > dirA/b
tar -vcf test.0.tar -incremental --newer '2150-02-08 21:50:00' dirA
tar: dirA: Directory is new
dirA/
dirA/a
dirA/b
---------------
It should not archive dirA/a and dirA/b
In src/create.c:
--------------------
This check is omitted if incremental_option is set *and* the
requested file is not explicitly listed in the command line. */
if (! (incremental_option && ! top_level)
--------------------
I do not understand why this check is done, maybe you want it for
--listed-incremental but it looks buggy for --incremental where we want to
compare the mtime for all files
The attached patch fix it and pass all 'make check'.
Jean-Louis
This message is the property of CARBONITE, INC. and may contain confidential or
privileged information.
If this message has been delivered to you by mistake, then do not copy or
deliver this message to anyone. Instead, destroy it and notify me by reply
e-mail
diff --git a/src/create.c b/src/create.c
index 35bcf5b..aa7ba96 100644
--- a/src/create.c
+++ b/src/create.c
@@ -1724,10 +1724,10 @@ dump_file0 (struct tar_stat_info *st, char const *name, char const *p)
/* See if we want only new files, and check if this one is too old to
put in the archive.
- This check is omitted if incremental_option is set *and* the
+ This check is omitted if listed_incremental_option is set *and* the
requested file is not explicitly listed in the command line. */
- if (! (incremental_option && ! top_level)
+ if (! (listed_incremental_option && ! top_level)
&& !S_ISDIR (st->stat.st_mode)
&& OLDER_TAR_STAT_TIME (*st, m)
&& (!after_date_option || OLDER_TAR_STAT_TIME (*st, c)))