threads / discuss / 3909

Next problem: empty ident <joern@limerick.(none)> not allowed

Subject: Next problem: empty ident <joern@limerick.(none)> not allowed

## tl;dr

6 messages between Apr 18, 2006 and Apr 19, 2006.

replies: 5people: 4as markdown or json

Jörn Engel· Apr 18, 2006, 20:25 UTC · lore

After successfully using a central object store with git://... instead of rsync://... (thanks to Sam and Linus), I've run into the next problem:

$ env | grep GIT GIT_AUTHOR_NAME=Joern Engel GIT_OBJECT_DIRECTORY=/home/joern/.git GIT_AUTHOR_EMAIL=joern@wh.fh-wedel.de

$ git pull git://git.infradead.org/mtd-2.6.git
Unpacking 74 objects
 100% (74/74) done
Trying really trivial in-index merge...
Wonderful.
fatal: empty ident  <joern@limerick.(none)> not allowed
Adding this to .git/config solved the problem:
[user]
	name = "Joern Engel"
	email = "joern@foo.bar"
And now I have some questions:
1. Why didn't the environment variables work?
2. Why is there a check for commit information when I pull from some
tree?
Jörn
-- 
I've never met a human being who would want to read 17,000 pages of
documentation, and if there was, I'd kill him to get him out of the
gene pool.
-- Joseph Costello
Junio C Hamano· Apr 18, 2006, 20:37 UTC · re: Jörn Engel · lore

Re: Next problem: empty ident <joern@limerick.(none)> not allowed

Jörn Engel <joern@wohnheim.fh-wedel.de> writes:
> And now I have some questions:
> 1. Why didn't the environment variables work?
> 2. Why is there a check for commit information when I pull from some
> tree?

Because "pull" means "fetch and merge the local modifications if any". When you merge (and you _did_ merge), you create a new commit of your own, and the commit records who committed it.

You need GIT_COMMITTER_EMAIL.

Now, the normal "git log" does not verbosely show committer and author,

Jörn Engel· Apr 18, 2006, 20:40 UTC · re: Junio C Hamano · lore

Re: Next problem: empty ident <joern@limerick.(none)> not allowed

On Tue, 18 April 2006 13:37:19 -0700, Junio C Hamano wrote:
Show 12 quoted lines
> Jörn Engel <joern@wohnheim.fh-wedel.de> writes:
> 
> > And now I have some questions:
> > 1. Why didn't the environment variables work?
> > 2. Why is there a check for commit information when I pull from some
> > tree?
> 
> Because "pull" means "fetch and merge the local modifications if
> any".  When you merge (and you _did_ merge), you create a new
> commit of your own, and the commit records who committed it.
> 
> You need GIT_COMMITTER_EMAIL.
Ok.  I was stupid in two accounts.  Thanks!
Jörn
-- 
Time? What's that? Time is only worth what you do with it.
-- Theo de Raadt
Junio C Hamano· Apr 18, 2006, 20:37 UTC · re: Jörn Engel · lore

Re: Next problem: empty ident <joern@limerick.(none)> not allowed

Jörn Engel <joern@wohnheim.fh-wedel.de> writes:
> And now I have some questions:
> 1. Why didn't the environment variables work?
> 2. Why is there a check for commit information when I pull from some
> tree?

Because "pull" means "fetch and merge the local modifications if any". When you merge (and you _did_ merge), you create a new commit of your own, and the commit records who committed it.

You need GIT_COMMITTER_EMAIL.
Petr Baudis· Apr 19, 2006, 09:51 UTC · re: Junio C Hamano · lore

Re: Next problem: empty ident <joern@limerick.(none)> not allowed

Dear diary, on Tue, Apr 18, 2006 at 10:37:47PM CEST, I got a letter where Junio C Hamano <junkio@cox.net> said that...

Show 12 quoted lines
> Jörn Engel <joern@wohnheim.fh-wedel.de> writes:
> 
> > And now I have some questions:
> > 1. Why didn't the environment variables work?
> > 2. Why is there a check for commit information when I pull from some
> > tree?
> 
> Because "pull" means "fetch and merge the local modifications if
> any".  When you merge (and you _did_ merge), you create a new
> commit of your own, and the commit records who committed it.
> 
> You need GIT_COMMITTER_EMAIL.
You mean GIT_COMMITTER_NAME. :-)
-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Right now I am having amnesia and deja-vu at the same time.  I think
I have forgotten this before.
Linus Torvalds· Apr 18, 2006, 20:47 UTC · re: Jörn Engel · lore

Re: Next problem: empty ident <joern@limerick.(none)> not allowed

On Tue, 18 Apr 2006, Jörn Engel wrote:
> 
> And now I have some questions:
> 1. Why didn't the environment variables work?

They do. But they just described the _author_. Git wanted the _committer_ to be described too.

So if you had used GIT_COMMITTER_NAME/EMAIL, everything would have been fine.

Notice that if you don't give any author information, git will assume that the committer is the author, so if you give committer information, you don't actually need to give author information. It "knows" that the committer is you, and since you don't tell it otherwise, it will think that you're the author too.

So the committer is always the "default author".

But the reverse is _not_ true: even if you tell git who the author is, it will _not_ assume that the committer is the same one. It knows that the committer is you, but you didn't talk about yourself, you just talked about the author.

That non-symmetric behaviour does make a lot of sense, if you think about it a while. The author is _not_ the "default committer".

Putting your name and email in the git config file solves the problem, because then git knows who the committer is (and by extension, the "default author").

> 2. Why is there a check for commit information when I pull from some
> tree?

Because you're going to create a merge commit. It wants to know who to attribute that merge to. Why the committer is, in other words.

		Linus

← back to recent threads