git/list[1] front-page[2] threads[3] people[4] search[5] about
 

possible bug: inconsistent CLI behaviour for empty user.name

From
Bbs.x.ttp@recursor.net <bs.x.ttp@recursor.net>
Date
Feb 3, 2017, 04:13 UTC
Message-ID
<20170203051309.a737846dd26a6ed8df1e4112@gmx.de>
The problem is that GIT accepts a user.name of " " for some operations (for example when doing a simple "git commit"), but does require a "non-empty" user.name for others (like git commit --amend and git rebase). In case of the latter commands GIT fails with the message "fatal: empty ident name (for <email@address>) not allowed".
As people tend to do simple commits first, before amending or rebasing something, they may have to change their name after some dozen of commits which doesn't look nice.
This is certainly not a big issue, but it turns out to be quite annoying and I've already rewritten the history of a GIT repository once because of it, so that all my commits had the same author.
Proposed solution: GIT's requirements for user.name should not depend on the operation. Either user.name should be enforced to be non-empty everywhere or an empty user.name should be accepted everywhere. Perhaps filling out one of user.name and user.email could be sufficient.
Next: Jeff King
Message 1 of 13 in “possible bug: inconsistent CLI behaviour for empty user.name”
  1. bs.x.ttp@recursor.netFeb 3, 2017
  2. Jeff KingFeb 23, 2017
  3. 2/4 ident: handle NULL email when complaining of empty nameJeff King, Feb 23, 2017
  4. 1/4 ident: mark error messages for translationJeff King, Feb 23, 2017
  5. 3/4 ident: reject all-crud ident nameJeff King, Feb 23, 2017
  6. 4/4 ident: do not ignore empty config name/emailJeff King, Feb 23, 2017
  7. Junio C HamanoFeb 23, 2017
  8. Jeff KingFeb 24, 2017
  9. Junio C HamanoFeb 24, 2017
  10. Jeff KingFeb 24, 2017
  11. Dennis KaarsemakerFeb 27, 2017
  12. Junio C HamanoFeb 27, 2017
  13. Christian CouderFeb 28, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.