-
Notifications
You must be signed in to change notification settings - Fork 25
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
API of Config->set, get to replace str, int, bool #209
Comments
This seems reasonable, here are my thoughts:
|
I'm not really a fan of putting the options directly after the key. If you wouldn't use the options, you would get something like |
The other way to do it is to make it the (optional) first parameter to |
I am curious about why you want this, it has the same rather inconsistent API. The options are optional and aren't needed per se to set the value. So why they come first is something I do not understand. |
I want any
If the optional |
I guess you could also make it work by putting the options last. It actually doesn't matter that much... |
Feel free to make it the last argument. |
Hi, I wasn't really happy with
str_add
because it leaves much of thepowerfull api that the git command line util has (or the git-api itself,
pick any :)).
the
git config
manual/help states:I want thinking about using changing/replacing the interface of
str
and
str_add
and implement aset
andget
method.set
could allow the following options:
There is also --unset, which could also be implemented by
set
, alaI'm not certain what the return values should be? Similar to multi-var?
get
would be similar in its api:Do you agree on this approach?
The text was updated successfully, but these errors were encountered: