threads / discuss / 12685

Should 'git config' support key with dot such as 'a.b'

Subject: Should 'git config' support key with dot such as 'a.b'

## tl;dr

7 messages between Mar 14, 2008 and Mar 18, 2008.

replies: 6people: 5as markdown or json

Ping Yin· Mar 14, 2008, 08:24 UTC · lore

I find it is so annoying to write submodule definition as follows (yeah, only url, without path)

------------------------------
[submodule 'crawler']
    url = url1
[submodule 'search']
    url = url2
------------------------------
I think the following form is more simple
---------------------------------
[submodule]
     crawler.url = url1
     search.url = url2
---------------------------------
So, could we support such simpler form?
-- 
Ping Yin
Johannes Schindelin· Mar 14, 2008, 10:39 UTC · re: Ping Yin · lore

Re: Should 'git config' support key with dot such as 'a.b'

Hi,
On Fri, 14 Mar 2008, Ping Yin wrote:
Show 18 quoted lines
> I find it is so annoying to write submodule definition as follows
> (yeah, only url, without path)
> 
> ------------------------------
> [submodule 'crawler']
>     url = url1
> [submodule 'search']
>     url = url2
> ------------------------------
> 
> I think the following form is more simple
> ---------------------------------
> [submodule]
>      crawler.url = url1
>      search.url = url2
> ---------------------------------
> 
> So, could we support such simpler form?

I don't like it at all. Historically, we had much stricter rules on the variable names than the second part of the section names.

Also, your suggestion would make things even more confusing than beginners already complain Git is.

Ciao, Dscho

Ping Yin· Mar 18, 2008, 00:40 UTC · re: Johannes Schindelin · lore

Re: Should 'git config' support key with dot such as 'a.b'

On Fri, Mar 14, 2008 at 6:39 PM, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:

Show 31 quoted lines
> Hi,
>
>
>
>  On Fri, 14 Mar 2008, Ping Yin wrote:
>
>  > I find it is so annoying to write submodule definition as follows
>  > (yeah, only url, without path)
>  >
>  > ------------------------------
>  > [submodule 'crawler']
>  >     url = url1
>  > [submodule 'search']
>  >     url = url2
>  > ------------------------------
>  >
>  > I think the following form is more simple
>  > ---------------------------------
>  > [submodule]
>  >      crawler.url = url1
>  >      search.url = url2
>  > ---------------------------------
>  >
>  > So, could we support such simpler form?
>
>  I don't like it at all.  Historically, we had much stricter rules on the
>  variable names than the second part of the section names.
>
>  Also, your suggestion would make things even more confusing than beginners
>  already complain Git is.
>

Beginners will not edit config file directly. If they do, they can follow the usaual syntax. So beginners don't have to know the new syntax.

But for advanced users, the config file can be edited freely with more free syntax. With current syntax, 'submodule' will be repeated tons of times when having tons of submoudles. Why not make life much easier for advanced users in such case?

-- 
Ping Yin
Junio C Hamano· Mar 18, 2008, 00:42 UTC · re: Ping Yin · lore

Re: Should 'git config' support key with dot such as 'a.b'

"Ping Yin" <pkufranky@gmail.com> writes:
Show 32 quoted lines
> On Fri, Mar 14, 2008 at 6:39 PM, Johannes Schindelin
> <Johannes.Schindelin@gmx.de> wrote:
>> Hi,
>>
>>
>>
>>  On Fri, 14 Mar 2008, Ping Yin wrote:
>>
>>  > I find it is so annoying to write submodule definition as follows
>>  > (yeah, only url, without path)
>>  >
>>  > ------------------------------
>>  > [submodule 'crawler']
>>  >     url = url1
>>  > [submodule 'search']
>>  >     url = url2
>>  > ------------------------------
>>  >
>>  > I think the following form is more simple
>>  > ---------------------------------
>>  > [submodule]
>>  >      crawler.url = url1
>>  >      search.url = url2
>>  > ---------------------------------
>>  >
>>  > So, could we support such simpler form?
>>
>>  I don't like it at all.  Historically, we had much stricter rules on the
>>  variable names than the second part of the section names.
>>
>>  Also, your suggestion would make things even more confusing than beginners
>>  already complain Git is.

I am not interested in this at all. I would usually say "it is not clear what advantage this has", but in this case, I would rather say "it is clear there is no advantage in this".

Xavier Maillard· Mar 17, 2008, 01:00 UTC · re: Ping Yin · lore

Re: Should 'git config' support key with dot such as 'a.b'

   I think the following form is more simple
   ---------------------------------
   [submodule]
	crawler.url = url1
	search.url = url2
   ---------------------------------
   So, could we support such simpler form?

Dunno if my vote will count but I really don't like your proposition. I find clearer with the current notation. What's more it forces people to be more rigorous when touching their configuration file.

git config is really simple to use and there should not be difficult for anybody (even new git users) to set up git using this helper tool. We should not recommend beginners to manually edit their .git/config file when git-config could be used.

	Xavier
-- 
http://www.gnu.org
http://www.april.org
http://www.lolica.org
Frank Lichtenheld· Mar 17, 2008, 08:48 UTC · re: Xavier Maillard · lore

Re: Should 'git config' support key with dot such as 'a.b'

On Mon, Mar 17, 2008 at 02:00:03AM +0100, Xavier Maillard wrote:
Show 18 quoted lines
>    I think the following form is more simple
>    ---------------------------------
>    [submodule]
> 	crawler.url = url1
> 	search.url = url2
>    ---------------------------------
> 
>    So, could we support such simpler form?
> 
> Dunno if my vote will count but I really don't like your
> proposition. I find clearer with the current notation. What's
> more it forces people to be more rigorous when touching their
> configuration file.
> 
> git config is really simple to use and there should not be
> difficult for anybody (even new git users) to set up git using
> this helper tool. We should not recommend beginners to manually
> edit their .git/config file when git-config could be used.

git config hasn't exactly a excellent track-record for dealing with all the possibilities the config syntax allows. Adding yet another possibility will not make it any more reliable.

Also your argument that people should git-config anyway instead of editing by hand kinda contradicts the need for a new format, since it would change anything for the git-config interface, only for people editing the file by hand...

At the end of the day I don't think the benefits justify the effort.
Gruesse,
-- 
Frank Lichtenheld <frank@lichtenheld.de>
www: http://www.djpig.de/
Frank Lichtenheld· Mar 17, 2008, 09:03 UTC · re: Frank Lichtenheld · lore

Re: Should 'git config' support key with dot such as 'a.b'

Bah, I really should be awake by now...
On Mon, Mar 17, 2008 at 09:48:15AM +0100, Frank Lichtenheld wrote:
> On Mon, Mar 17, 2008 at 02:00:03AM +0100, Xavier Maillard wrote:
> Also your argument that people should git-config anyway instead of
s/should/should use/
> editing by hand kinda contradicts the need for a new format, since
> it would change anything for the git-config interface, only for people
s/would/would not/
> editing the file by hand...
> 
> At the end of the day I don't think the benefits justify the effort.
Gruesse,
-- 
Frank Lichtenheld <frank@lichtenheld.de>
www: http://www.djpig.de/

← back to recent threads