# a problem with the gitconfig file for user.email

4 messages from 2011-03-13 to 2011-03-15. Participants: Guy Maurel, Matthieu Moy, Junio C Hamano.
Thread: https://gitlist.dev/t/26724

## Guy Maurel, 2011-03-13 17:32

Subject: a problem with the gitconfig file for user.email
Message-ID: <loom.20110313T182907-610@post.gmane.org>
URL: https://gitlist.dev/e/loom.20110313T182907-610%40post.gmane.org

```
why is it necessary to have a <TAB> before the email keyword in the [user]
section? Other keywords work with whitespace.
If not, one get the error message:
  fatal: bad config file line 2 in /home/guy-kde/.gitconfig

```

## Matthieu Moy, 2011-03-13 22:29

Subject: Re: a problem with the gitconfig file for user.email
Message-ID: <vpqy64iy7r3.fsf@bauges.imag.fr>
URL: https://gitlist.dev/e/vpqy64iy7r3.fsf%40bauges.imag.fr
In-Reply-To: <loom.20110313T182907-610@post.gmane.org>

```
Guy Maurel <guy-kde@maurel.de> writes:

> why is it necessary to have a <TAB> before the email keyword in the [user]
> section?

It isn't. I've just checked with email right at the beginning of the
line, without tab or space, and it works (with the latest git.git).

> If not, one get the error message:
>   fatal: bad config file line 2 in /home/guy-kde/.gitconfig

Please, give a short and reproducible senario (eg. the full content of
.gitconfig, and the command you've typed to get this).

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

```

## Junio C Hamano, 2011-03-13 23:01

Subject: Re: a problem with the gitconfig file for user.email
Message-ID: <7v8vwihbfx.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7v8vwihbfx.fsf%40alter.siamese.dyndns.org
In-Reply-To: <vpqy64iy7r3.fsf@bauges.imag.fr>

```
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:

> Guy Maurel <guy-kde@maurel.de> writes:
>
>> why is it necessary to have a <TAB> before the email keyword in the [user]
>> section?
>
> It isn't. I've just checked with email right at the beginning of the
> line, without tab or space, and it works (with the latest git.git).
>
>> If not, one get the error message:
>>   fatal: bad config file line 2 in /home/guy-kde/.gitconfig
>
> Please, give a short and reproducible senario (eg. the full content of
> .gitconfig, and the command you've typed to get this).

Good suggestion.  I suspect this is some third party programs or hooks
that are trying to hand parse the config file.  In the distant past, some
of our perl based Porcelains may have done so but I think these days
everything we ship should be reading from "git config" output or calling
git_config() from C.

```

## Guy Maurel, 2011-03-15 17:45

Subject: Re: a problem with the gitconfig file for user.email
Message-ID: <201103151845.52330.guy-kde@maurel.de>
URL: https://gitlist.dev/e/201103151845.52330.guy-kde%40maurel.de
In-Reply-To: <7v8vwihbfx.fsf@alter.siamese.dyndns.org>

```
Hello!

Thanks for helping, but...
On Monday, March 14, 2011 12:01:38 AM Junio C Hamano wrote:
> Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
> > Guy Maurel <guy-kde@maurel.de> writes:
> >> why is it necessary to have a <TAB> before the email keyword in the
> >> [user] section?
> > 
> > It isn't. I've just checked with email right at the beginning of the
> > line, without tab or space, and it works (with the latest git.git).
> > 
> >> If not, one get the error message:
> >>   fatal: bad config file line 2 in /home/guy-kde/.gitconfig
> > 
> > Please, give a short and reproducible senario (eg. the full content of
> > .gitconfig, and the command you've typed to get this).
I had very little things:
[user]
      name = Guy Maurel
      email = guy-kde@maurel.de
^^ these are spaces
> 
> Good suggestion.  I suspect this is some third party programs or hooks
> that are trying to hand parse the config file.  In the distant past, some
> of our perl based Porcelains may have done so but I think these days
> everything we ship should be reading from "git config" output or calling
> git_config() from C.
I am using kernel 2.6.37-ARCH and git 1.7.4.1-1 64bits
But I cannot reproduce the problem *today*.
I am sorry, so sorry. I bet your pardon.

As I made a git config --add user.email  guy-kde@maurel.de
I got a <TAB> before the email keyword, this leads me to my question.

Thanks for helping
-- 
guy

```
