You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When there is a config file, and the user runs a command like git town config push-hook yes, it should update the config file instead of storing this setting in Git metadata. Options for updating the config file:
De-serialize the existing config data structure to TOML.
++ easy to build
++ reliable
-- removes all comments from the file
Search-and-replace the setting in the textual config file content.
++ minimal changes
++ comments get preserved
-- complicated to build, lots of edge cases
-- could fail to update a valid config file if it is formatted funny
-- could leave the configuration file in an invalid state
For now, let's assume Git Town users change the config file manually and go with the simple but robust serialization of config data to get something workable out the door. Chances are this will be good enough. We can implement the more sophisticated file saving alternative later.
When there is a config file, and the user runs a command like
git town config push-hook yes
, it should update the config file instead of storing this setting in Git metadata. Options for updating the config file:De-serialize the existing config data structure to TOML.
Search-and-replace the setting in the textual config file content.
Variations that we have to deal with:
Nested vs dotted keys:
Single vs multi-line table:
Non-options
Don't update the config file, tell the user to do it manually.
The text was updated successfully, but these errors were encountered: