mc-image-helper icon indicating copy to clipboard operation
mc-image-helper copied to clipboard

Patch creator

Open DaRacci opened this issue 2 years ago • 9 comments

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

DaRacci avatar Dec 19 '22 14:12 DaRacci

Can you please provide some examples?

itzg avatar Dec 19 '22 14:12 itzg

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.

DaRacci avatar Dec 19 '22 14:12 DaRacci

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

itzg avatar Dec 19 '22 15:12 itzg

Theres no problem im suggesting like a feature

DaRacci avatar Dec 19 '22 15:12 DaRacci

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 avatar Dec 19 '22 16:12 itzg

...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?

itzg avatar Dec 19 '22 16:12 itzg

...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?

DaRacci avatar Dec 19 '22 16:12 DaRacci

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"?

itzg avatar Dec 19 '22 21:12 itzg

Yeah that would be easy to use

DaRacci avatar Dec 20 '22 03:12 DaRacci