bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] Option --exclude-ignore behaves unexpectedly


From: Chris Marusich
Subject: Re: [Bug-tar] Option --exclude-ignore behaves unexpectedly
Date: Mon, 21 Nov 2016 01:52:37 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Chris Marusich <address@hidden> writes:

> 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.

Has anyone seen this email?  I haven't received a reply, so I'm not sure
if my message was received by anyone on the list.

-- 
Chris

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]