Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git-am not reading configuration correctly

Tags:

git

git-config

It appears that git am --continue is not reading my configuration correctly.

git am --continue 
Applying: 
fatal: empty ident name (for <>) notallowed

I tried following the advice in git post-receive hook "empty ident name". Initially user.name and user.email were correct when running git config --global -l. I followed the advice in the previous question so the exact same values are also returned for git config --local -l.

I find it strange that (for <>) is in the error message. From the configuration in mentioned question, it looks like remote.origin.url is being ignored.

My setup works flawlessly otherwise. This is the first time I've run into this type of error.

Any suggestions?

like image 364
Lawrence Barsanti Avatar asked Apr 17 '26 14:04

Lawrence Barsanti


1 Answers

I think the fact git am ignores the global configuration values is by design - the commit should have the the name/email of the patch author, not yours.

Instead, when continuing, git am reads this information from the file .git/rebase-apply/author-script, which should have been filled with the correct values by git mailinfo before stopping:

GIT_AUTHOR_NAME='Committer'
GIT_AUTHOR_EMAIL='[email protected]'
GIT_AUTHOR_DATE='Thu, 28 Apr 2016 11:38:59 -0700'

Most likely, the applied .patch-file was not correctly formatted (i.e. missing From: and Date: lines), so that git mailinfo wasn't able to figure out these values.

You can enter them manually and then run git am --continue to continue with the correct values.

like image 104
Benno Avatar answered Apr 19 '26 17:04

Benno