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

feature request: Bring in some diff options: ignore-all-space, recursive, brief #316

Open
dtrts opened this issue Sep 11, 2023 · 1 comment

Comments

@dtrts
Copy link

dtrts commented Sep 11, 2023

Hello team 👋

I stumbled across this project whilst building out a pipeline to compare to kubernetes manifests with each other. I was super happy to find something which understands yaml and also can match kubernetes objects!

As in my current pipeline I am just using the diff tool, I make use of a couple of features which I think would also be useful here. Below i'm referencing the command line options:

  • ignore-all-space This ignores whitespace, also mentioned in this issue: Allow omitting whitespace only changes #222
  • recursive When provided with two folders it will perform a diff on all files
  • brief When running in recursive mode (or not i think) it will return only the file names which have a diff.

Whilst experimenting I ran dyff on a manifest which was adding / removing a large kubernetes CRD. The output then returned all 1000 lines of the CRD!
An enhancement I could see here is an option to only return the location and the type of change.
That would inform me that a document has been added/removed and the keys it matched on. Or for each document the keys which are seen in the diff.

Thank you for your time. I'm no go expert but hope that one day I can give this a go myself. If you think any of these are worth implementing and do so before me then even better.

Thank you!

@DLakin01
Copy link

DLakin01 commented Oct 3, 2023

+1 to the recursive option, it'd be great to use this tool to inspect entire directories of YAML files!

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

No branches or pull requests

2 participants