bug-tar
[Top][All Lists]
Advanced

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

add an --ignore-file option


From: Caleb Cushing
Subject: add an --ignore-file option
Date: Thu, 14 Mar 2024 16:14:22 -0400

So it would be nice to have an option to not add files to the repo based on an ignore file. The ignore format seems consistent across many projects, linking git's as an example.

https://git-scm.com/docs/gitignore

I do not think that this option should look at `~/.gitignore` specifically (even if that is my use case), as that would add a dependency on a single unrelated project. Instead I would like to be able to (for example)

tar --ignore-file demo/.gitignore --ignore-file demo/.dockerignore -cvf demo.tar.gz demo

or maybe

tar --ignore-files demo/.gitignore demo/.dockerignore

tar --ignore-files 'demo/.*ignore' # glob not regex

I'm open to other option names. Yesterday while uploading a project bug reproducer that wasn't "clean" I realized that it would have been nice to do this instead of running around trying to remove all ignored files first.

usingĀ  (GNU tar) 1.35 and I didn't notice anything in man tar when I looked at it, sorry if I missed anything related.

Please CC not on list
--

reply via email to

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