mirror of
https://git.savannah.gnu.org/git/tar.git
synced 2026-09-09 01:36:03 +00:00
Fix the --exclude-backups option.
* src/tar.c (add_exclude_array): Take exclude option filags in its second argument. (parse_opt): Register backup_file_table with the EXCLUDE_WILDCARDS flag. * tests/exclude07.at: New testcase. * tests/Makefile.am (TESTSUITE_AT): Add testsuite.at. * tests/testsuite.at: Include exclude07.at.
This commit is contained in:
@@ -892,12 +892,12 @@ static char const * const backup_file_table[] = {
|
||||
};
|
||||
|
||||
static void
|
||||
add_exclude_array (char const * const * fv)
|
||||
add_exclude_array (char const * const * fv, int options)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; fv[i]; i++)
|
||||
add_exclude (excluded, fv[i], 0);
|
||||
add_exclude (excluded, fv[i], options);
|
||||
}
|
||||
|
||||
|
||||
@@ -1769,7 +1769,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
|
||||
break;
|
||||
|
||||
case EXCLUDE_BACKUPS_OPTION:
|
||||
add_exclude_array (backup_file_table);
|
||||
add_exclude_array (backup_file_table, EXCLUDE_WILDCARDS);
|
||||
break;
|
||||
|
||||
case EXCLUDE_OPTION:
|
||||
@@ -1804,7 +1804,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
|
||||
break;
|
||||
|
||||
case EXCLUDE_VCS_OPTION:
|
||||
add_exclude_array (vcs_file_table);
|
||||
add_exclude_array (vcs_file_table, 0);
|
||||
break;
|
||||
|
||||
case FORCE_LOCAL_OPTION:
|
||||
|
||||
Reference in New Issue
Block a user