container-diff icon indicating copy to clipboard operation
container-diff copied to clipboard

Enhancement: Ignore certain file types when diff'ing

Open grayaii opened this issue 6 years ago • 2 comments

This is more a question/enhancement than a bug.

Is there a way to ignore certain file types, like *.pyc files?

Expected behavior

An option to ingore certain file patterns, like *.pyc

Actual behavior

All files are a diff'ed, including pyc files.

Information

  • container-diff version: v0.15.0
  • Operating system: AWS Linux

Steps to reproduce the behavior

  1. ./container-diff diff daemon://XXXX daemon://YYYYY --type=history --type=file --type=size --type=rpm --type=pip --type=apt --type=node --json

We get a bazillion file diffs on pyc files.

Is there a way to ignore pyc files?

grayaii avatar Feb 21 '19 23:02 grayaii

@grayaii thanks for the issue, this is a really good point. we don't currently support any "smart" way of ignoring files (apart from running through grep or something which is pretty ugly). we could consider adding some sort of ignore file (maybe ~/.container-diff/.ignore or something similar) that supports glob patterns for whitelisting/blacklisting files from a file analysis.

would you be interesting in sending a PR for this? I'd definitely like to see this feature supported natively, but unfortunately don't really have the cycles to build it out myself.

nkubala avatar Mar 01 '19 20:03 nkubala

Hello 😊

I would also benefit from this kind of feature :pray:

bcouetil avatar Jul 27 '22 15:07 bcouetil