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

Patch creator #72

Open
DaRacci opened this issue Dec 19, 2022 · 9 comments
Open

Patch creator #72

DaRacci opened this issue Dec 19, 2022 · 9 comments
Labels
enhancement New feature or request

Comments

@DaRacci
Copy link

DaRacci commented Dec 19, 2022

By supplying a modified file and a default file there would be a patch file that is filled with only the changed or new values

@itzg
Copy link
Owner

itzg commented Dec 19, 2022

Can you please provide some examples?

@DaRacci
Copy link
Author

DaRacci commented Dec 19, 2022

Like for example having a lang file for a plugin which you have a modified file of already with lets say changed values for paths c, e and z and want to make it a patch file which would only consist of those changes, you would supply both the file including your changes and also the plugins default lang file, it would then work the different values and add those to a patch file with the set op and if there was a new key in modified file provided it would add the put op for that path.

@itzg
Copy link
Owner

itzg commented Dec 19, 2022

To clarify, please provide files that recreate the problem. I cannot work on this until that is provided.

@DaRacci
Copy link
Author

DaRacci commented Dec 19, 2022

Theres no problem im suggesting like a feature

@itzg
Copy link
Owner

itzg commented Dec 19, 2022

I'm sorry, I was obviously in a "bug report" mode there.

Actually, some example files (lang file, patch set file(s), etc) would still help even if they're made up files with proposed operators, etc.

@itzg itzg added the enhancement New feature or request label Dec 19, 2022
@itzg
Copy link
Owner

itzg commented Dec 19, 2022

...and read your follow up comment one more time and I think it's clicking for me. It's kind of like a "diff" operation where given the two JSON files, identify the items that changed, and create a PatchSet file with those changes?

@DaRacci
Copy link
Author

DaRacci commented Dec 19, 2022

...and read your follow up comment one more time and I think it's clicking for me. It's kind of like a "diff" operation where given the two JSON files, identify the items that changed, and create a PatchSet file with those changes?

Yeah that would be the one, do you want some examples still?

@itzg
Copy link
Owner

itzg commented Dec 19, 2022

No, thanks, I think I know where to go with this now. Just to clarify does it seem reasonable to one-off run mc-image-helper with a new subcommand like "patch-create"?

@DaRacci
Copy link
Author

DaRacci commented Dec 20, 2022

Yeah that would be easy to use

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: To do
Development

No branches or pull requests

2 participants