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

✨ add different strategies for module synchronization #11

Open
jeftadlvw opened this issue May 14, 2024 · 0 comments
Open

✨ add different strategies for module synchronization #11

jeftadlvw opened this issue May 14, 2024 · 0 comments
Labels
feature request New feature or request
Milestone

Comments

@jeftadlvw
Copy link
Owner

jeftadlvw commented May 14, 2024

The current synchronization behaviour is fixed. If a submodule does not exist at it's set location, the configuration is chosen as the source of truth and the module is cloned. But if the module already exists, the module is set as the source of truth and the configuration is changed.

It should be possible to define and set this behaviour in the configuration with an optional field:

[[submodule]]
  path = "path/to/repository"
  url = "https://url/to/repository"
  sync = "SYNC_STRATEGY"

It should also be a flag when synchronizing single submodules (#9) for setting the strategy temporarily.

Possible strategies could be:

  • module: if the module exists, it's the source of truth
  • config: set the configuration as the source of truth. An error is displayed if a checkout or url-change would result in lost changes.
  • ignore: just create the submodule and ignore all further changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant