jeftadlvw / git-nest

Nest external repositories into your project without git being bothered.
https://github.com/jeftadlvw/git-nest
Apache License 2.0
1 stars 1 forks source link

✨ add different strategies for module synchronization #11

Open jeftadlvw opened 4 months ago

jeftadlvw commented 4 months ago

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: