Skip to contentSkip to conversation

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

DISCUSSION Jörn Engel 4 participants 6 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

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
[email protected]
$ 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 = "[email protected]"

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

Signature · 4 lines
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
#1 lore raw
Quoted 4 lines · Jörn Engel

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.

#2 lore raw

Dear diary, on Tue, Apr 18, 2006 at 10:37:47PM CEST, I got a letter where Junio C Hamano <[email protected]> said that...

Quoted 7 lines
Quoted 4 lines · Jörn Engel

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?

Quoted 5 lines

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. :-)

Signature · 4 lines
				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.
#3 lore raw
In reply to Jörn Engel
Quoted 4 lines · Jörn Engel

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,

#4 lore raw
Quoted 7 lines · Junio C Hamano
Quoted 4 lines · Jörn Engel

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?

Quoted 5 lines

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

Signature · 2 lines
Time? What's that? Time is only worth what you do with it.
-- Theo de Raadt
#5 lore raw
In reply to Jörn Engel
Quoted 3 lines · Jörn Engel

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").

Quoted 2 lines

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