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

apply a "changeset" on a file #2

Open
tommens opened this issue Oct 25, 2023 · 1 comment
Open

apply a "changeset" on a file #2

tommens opened this issue Oct 25, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@tommens
Copy link
Collaborator

tommens commented Oct 25, 2023

"gawd file1.yml file2.yml" returns a set of changes (diffs) that allows to go from file1.yml to file2.yml
So perhaps it would be useful as well to apply "gawd file1.yml changeset" that takes as input a yaml file and a changeset et returns the file2.yml that is the result of applying the changeset to the yaml file

@AlexandreDecan
Copy link
Collaborator

I really like this idea. Gawd, to some extent, can be compared to diff, and it would make sense to have a tool similar to patch. That said, I think this should be made in a separate tool (rather than directly supported by gawd), the same way that diff and patch are distributed.

If, at some point, we're going to develop such a gawd-patch tool, we need:

  • To define what a "changeset" is (currently, it's just a list of 5-uples);
  • To clarify the notion of "path" within a workflow file (perhaps we need to turn the string representation of a path into an actual object, so we can manipulate it more easily, by allowing wildcards for example);
  • To find a way to preserve syntactic elements (whitespaces, blank lines, comments, string formatting, etc.);

@AlexandreDecan AlexandreDecan added the enhancement New feature or request label Oct 30, 2023
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
None yet
Development

No branches or pull requests

2 participants