Need to add functionality that allows users to push certain dotfile changes to multiple branches at once. This will necessitate a config file.
This is an insane doozy of a feature and it's going to take me a while to think about how to do this.
A rough gameplan I can think of is as follows:
- Identify branches in the config file that have files/directories that should be pushed to whenever those files/directories are updated in other branches
- Iterating over each branch, check to see if those files/directories were updated in the changes being pushed up.
- If so, copy them to somewhere on local storage, check out the branch to update, copy those files/directories into the local branch, then push up changes.
Example:
I have my desktop and cloud branches set to automatically sync in any changes made to my nvim/ directory from each other. When I update my nvim/ directory from the desktop branch, those changes should also automatically be applied to the cloud branch, leaving out any changes made to other parts of the desktop branch.
Rough draft config structure:
[sync]
cloud = { files = ["nvim/*"], branches = ["desktop"] }
desktop = { files = ["nvim/*"], branches = ["cloud"] }
Note: at this point I should probably just bite the bullet and switch to JSON for the config file. With how verbose some of these config options are, it's going to be gross to write out all in one line.
Relates to #28
Need to add functionality that allows users to push certain dotfile changes to multiple branches at once. This will necessitate a config file.
This is an insane doozy of a feature and it's going to take me a while to think about how to do this.
A rough gameplan I can think of is as follows:
Example:
I have my
desktopandcloudbranches set to automatically sync in any changes made to mynvim/directory from each other. When I update mynvim/directory from thedesktopbranch, those changes should also automatically be applied to thecloudbranch, leaving out any changes made to other parts of thedesktopbranch.Rough draft config structure:
Note: at this point I should probably just bite the bullet and switch to JSON for the config file. With how verbose some of these config options are, it's going to be gross to write out all in one line.
Relates to #28