aconfmgr icon indicating copy to clipboard operation
aconfmgr copied to clipboard

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

Open v1kn opened this issue 8 years ago • 7 comments

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

v1kn avatar Sep 21 '16 10:09 v1kn

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

CyberShadow avatar Sep 21 '16 10:09 CyberShadow

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

v1kn avatar Sep 21 '16 10:09 v1kn

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

CyberShadow avatar Sep 21 '16 10:09 CyberShadow

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.

CyberShadow avatar Sep 26 '16 11:09 CyberShadow

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

v1kn avatar Sep 26 '16 15:09 v1kn

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.

Backfighter avatar Jun 26 '19 06:06 Backfighter

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.

Octelly avatar May 27 '22 23:05 Octelly