hpi-swa / Squot

Squeak Object Tracker - Version control for arbitrary objects, currently with Git storage
Other
61 stars 29 forks source link

Add support for multi-valued git config options #197

Open j4yk opened 6 years ago

j4yk commented 6 years ago

Currently, the interface of GitRepository assumes that there is only one value for each setting. But in fact, there can be multiple. For example, a remote can have multiple fetch specs (example taken from Pro Git):

[remote "origin"]
    url = https://github.com/schacon/simplegit-progit
    fetch = +refs/heads/master:refs/remotes/origin/master
    fetch = +refs/heads/experiment:refs/remotes/origin/experiment

git-config has some options to deal with multi-valued settings: --get-all --replace-all --unset-all

j4yk commented 4 years ago

One problem here is that the INIFile package which is currently used to parse the configuration files uses Dictionaries to store the values. So at this basic level duplicate options are not supported. Looks like an alternative for reading and writing the configuration files must be implemented.