From: Andreas Heiduk <asheiduk@gmail.com>
To: Jonathan Nieder <jrnieder@gmail.com>, Jeff King <peff@peff.net>
Cc: "aleksander.baranowski" <aleksander.baranowski@yahoo.pl>,
git@vger.kernel.org
Subject: Re: Git config multiple values
Date: Fri, 6 Oct 2017 20:58:15 +0200 [thread overview]
Message-ID: <962cbecd-4be1-f041-30e3-cc4cd19310d0@gmail.com> (raw)
In-Reply-To: <20171006172530.GV19555@aiede.mtv.corp.google.com>
Hi,
Am 06.10.2017 um 19:25 schrieb Jonathan Nieder:
> Hi,
>
> Jeff King wrote:
>> On Fri, Oct 06, 2017 at 01:10:17PM +0200, aleksander.baranowski wrote:
>
>>> It's just an opinion, but this behaviour is no consistent for me.
>>>
>>> If it's not the bug it's a feature just let me know.
>>
>> It's a feature, though I agree that git-config is rather baroque. We're
>> mostly stuck with it for reasons of backwards compatibility, though.
>
> This feels like a dodge. Can we make a list of what is baroque here,
> with an eye to fixing it? E.g. if we introduce a new --set option,
> then what should its semantics be, to be more intuitive?
My reading of the manual for
git config --global user.name Foo2 Bar
is this:
Multiple lines can be added to an option by using the --add option.
Does not apply here - no `--add` option, so no new value should be added.
If you want to update or unset an option which can occur on multiple
lines, a POSIX regexp value_regex needs to be given.
does not apply: First: no "--unset" variant is used here leaving only "update".
Second: before that command there is only one value.
Only the existing values that match the regexp are updated or unset.
Since "Two" does not match the previous value and `update` is the only
described case left I'd expect that the command changes nothing.I don't
understand how the description allows `git config` to add a new value,
because the manual talks about "update" twice, nothing about adding.
Confused
--Andreas
prev parent reply other threads:[~2017-10-06 18:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-06 11:10 Git config multiple values aleksander.baranowski
2017-10-06 14:32 ` Jeff King
2017-10-06 16:57 ` aleksander.baranowski
2017-10-06 17:25 ` Jonathan Nieder
2017-10-06 17:28 ` Jeff King
2017-10-06 18:58 ` Andreas Heiduk [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=962cbecd-4be1-f041-30e3-cc4cd19310d0@gmail.com \
--to=asheiduk@gmail.com \
--cc=aleksander.baranowski@yahoo.pl \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).