Files
tar/src
Sergey Poznyakoff b960c38c4b (dump_file0): The conditional at line
1296 prevented incremental backups on individual files
from working, as reported by Andreas Schuldei
<andreas@schuldei.org>.

This is due to the condition

  (0 < top_level || !incremental_option)

Removing it makes incremental backups work for individual
files as well as for directories. On the other hand, it does
not affect other functionality, as shown by the reasoning below:

To begin with, the two parts of this condition are mutually
superfluous, because

  1) when top_level < 0, incremental_option == 1
  so the condition yields false
  2) when top_level >= 0, incremental_option == 0
  so the condition yields true.

In other words, it is completely equivalent to

      (!incremental_option)

Now, let's consider the effect of its removal. There are two cases:

1) when incremental_option==1
This means incremental backup in progress. In this case dump_file
is invoked only for directories or for files marked with 'Y' by
get_directory_contents. The latter are those that did not meet the
condition in incremen.c:242, which is exactly the same condition
as this at create.c:1296. So, for these files the check
(!incremental_option) is useless, since the rest of the
conditional will yield false anyway. On the other hand, if
dump_file is invoked on a directory, the conditional will yield
false due to !S_ISDIR assertion, so these will be processed as usual.

Thus, for this case the extra condition (!incremental_option) is
irrelevant, and its removal won't alter the behavior of tar,
*except* that it will enable incremental backups on individual
files, which is the wanted effect.

2) when incremental_option==0
In this case the condition yields true and its removal does not
affect the functionality.
2004-02-21 09:33:58 +00:00
..
2003-07-24 14:43:30 +00:00
1998-09-09 23:52:32 +00:00
1999-08-17 19:59:28 +00:00
1997-04-24 02:25:57 +00:00
1997-04-16 21:02:57 +00:00
1994-11-16 02:57:33 +00:00
2004-02-21 09:33:58 +00:00
1994-11-16 02:42:21 +00:00
1994-11-16 02:55:29 +00:00
1994-11-16 02:49:36 +00:00
2003-11-17 07:32:37 +00:00
1994-11-16 02:40:27 +00:00
1994-11-16 02:56:44 +00:00
2003-08-31 22:55:21 +00:00
1994-11-16 02:56:44 +00:00
1994-11-16 02:56:44 +00:00
1997-04-15 20:33:59 +00:00
1994-11-16 02:57:06 +00:00
1994-11-16 02:43:59 +00:00
1994-11-16 02:49:56 +00:00
1994-11-16 02:47:40 +00:00
2003-07-05 07:21:49 +00:00
2003-12-25 10:20:19 +00:00
2004-02-20 11:45:15 +00:00
1994-11-16 02:57:28 +00:00
1994-11-16 02:50:03 +00:00
1994-11-16 02:44:11 +00:00
2004-02-20 15:34:12 +00:00