mirror of
https://git.savannah.gnu.org/git/tar.git
synced 2026-04-20 16:40:39 +00:00
Any two conflicting options are reported only if they both occur in the command line. Otherwise, options defined in the command line silently override those set in the TAR_OPTIONS environment variable. * src/common.h (option_source): New enum. (option_locus): New struct. * src/names.c (name_elt): New member: line. (name_add_file): Initialize line. (read_name_from_file): Keep track of input line number for diagnostic purposes. (handle_option): Take a pointer to struct name_elt as 2nd parameter; pass locus info to more_options(). * src/tar.c (tar_args): New member: loc. (option_class): New enum. (optloc_save,optloc_lookup) (option_set_in_cl,optloc_eq): New functions. (set_use_compress_program_option): Take into account option location. (set_old_files_option): New function. (parse_opt): Keep track of option locations. (more_options): Improve error reporting. (parse_default_options): New function. (decode_options): Parse TAR_OPTION and command line separately. Options from the latter silently override those from the former. * lib/prepargs.c: Remove. * lib/prepargs.h: Remove. * lib/Makefile.am: Update.