Hi, I've noticed that the --exclude-ignore option to tar behaves in a way I didn't expect. I've attached a script you can run in a clean temporary directory to demonstrate this. Here's what I see when I copy the script into an empty directory, cd into that directory, and run it:
--8<---------------cut here---------------start------------->8--- Before: a: b exclusions a/b: c Tarball contents: a/ a/exclusions a/b/ --8<---------------cut here---------------end--------------->8--- My understanding is that the file specified by --exclude-ignore only applies to the directory it's in, so I expected a result like the following: --8<---------------cut here---------------start------------->8--- Tarball contents: a/ a/exclusions a/b/ a/b/c --8<---------------cut here---------------end--------------->8--- The behavior I expected seems to be in line with the manual, which says the following ((tar) Option Summary): --8<---------------cut here---------------start------------->8--- '--exclude-ignore=FILE' Before dumping a directory, 'tar' checks if it contains FILE. If so, exclusion patterns are read from this file. The patterns affect only the directory itself. *Note exclude::. --8<---------------cut here---------------end--------------->8--- However, that isn't the behavior I've observed. Instead, it looks like tar has excluded c, even though the file specified by --exclude-ignore should have only applied to directory a, not to its child directory b. Is the behavior I've observed intended? Based on what the manual says, I suspect it isn't. -- Chris Marusich
problem.sh
Description: Bourne shell script
signature.asc
Description: PGP signature