Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AddPath, which would un-ignore a subdirectory of an ignored directory #12

Open
v1kn opened this issue Sep 21, 2016 · 7 comments
Open

Comments

@v1kn
Copy link

v1kn commented Sep 21, 2016

Add a new parameter to the configuration, that would enable adding select paths inside overall ignored ones.

For example,
To be able to backup /usr/lib/aconfmgr, while ignoring everything else, like:

IgnorePath '/usr/lib'
AddPath '/usr/lib/aconfmgr'

Something similar to how gitignore file works

@CyberShadow
Copy link
Owner

Unfortunately this is not easily possible, due to how file enumeration is currently done.

@v1kn
Copy link
Author

v1kn commented Sep 21, 2016

That is, You would need to extensively rewrite aconfmgr to implement it?

@CyberShadow
Copy link
Owner

It would mean reimplementing this block, however it could mean a massive performance decrease and a large increase in code complexity.

@CyberShadow
Copy link
Owner

I guess it would be possible by making each AddPath instance correspond to a find invocation (i.e. there being an implicit AddPath /), then ignore IgnorePath rules which match the initial AddPath.

@v1kn
Copy link
Author

v1kn commented Sep 26, 2016

While i cannot offer a pull request, I will surely test the feature if/when it is added.

@Backfighter
Copy link

I have added a wiki entry which provides a function that allows for whitelisting files:
https://github.com/CyberShadow/aconfmgr/wiki/Whitelist-files

It basically finds everything that is not on your whitelist and ignores it. This allows for your usecase without a massiv rewrite of aconfmgr.

@CyberShadow CyberShadow changed the title [feature request] Introduce AddPath option Add AddPath, which would un-ignore a subdirectory of an ignored directory Nov 22, 2021
@Octelly
Copy link

Octelly commented May 27, 2022

I'm assuming there hasn't been any progress made on this, just checking if I'm wrong. Not sure if my shell scripting skills are good enough for this, but I might consider looking into this myself as this would be super useful for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants