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

Re: Git Rebase blows away GIT_AUTHOR_NAME

From
Erik Faye-Lund <kusmabite@gmail.com>
Date
Jan 14, 2011, 16:30 UTC
Message-ID
<AANLkTimcQq++CLv66AyTve+PiXBhYdUPk2epCyOXX1c0@mail.gmail.com>
In-Reply-To
<20110114162144.GA867@sigill.intra.peff.net>
On Fri, Jan 14, 2011 at 5:21 PM, Jeff King <peff@peff.net> wrote:
Show 31 quoted lines
> On Fri, Jan 14, 2011 at 05:13:59PM +0100, Erik Faye-Lund wrote:
>
>> > The three-letter minimum is just a sanity check. If your name really
>> > is even just three letters, I suspect you're just lying. I don't know
>> > of anybody named "A B".
>> >
>> Thanks for clarifying that it's not there for a technical reason. The
>> thing is, git-am seems to be the only place where such a sanity-check
>> is performed. Shouldn't git-commit rather perform such checks also (if
>> such a check should be done at all), perhaps with an override similar
>> to --allow-empty? And on top of all it doesn't barf, it just silently
>> replace the name with the e-mail...
>
> I tend to agree with Linus on the stupidity issue, but I do worry about
> the subtlety of the results. It causes silent data corruption during a
> rebase (or when somebody is applying an emailed patch). On the other
> hand, I do understand why Linus made a sanity check in the first place;
> his use case is to deal with whatever crap people happen to mail him,
> whether they have used git or not.
>
> So we should probably do one or both of:
>
>  1. Make an --allow-any-name option to mailinfo, and use it when we
>     invoke mailinfo internally for rebasing. That still doesn't solve
>     the emailed patch problem, but at least keeps purely internal
>     operations sane.
>
>  2. Bump the check up to git-commit time, which is the best place to
>     catch and tell somebody that their name is too short, because they
>     can actually fix it.
>

The problem with (2) is that git-am uses git-commit-tree rather than git-commit. But I do think that adding the same checks to git-commit would make sense. Unless we decide to remove the checks, that is...

Previous: Jeff KingNext: Jeff King
Message 16 of 30 in “Git Rebase blows away GIT_AUTHOR_NAME”
  1. JT OldsJan 12, 2011
  2. Jeff KingJan 12, 2011
  3. JT OldsJan 13, 2011
  4. JT OldsJan 13, 2011
  5. Erik Faye-LundJan 13, 2011
  6. JT OldsJan 13, 2011
  7. Erik Faye-LundJan 13, 2011
  8. Tor ArntsenJan 14, 2011
  9. Erik Faye-LundJan 14, 2011
  10. Tor ArntsenJan 14, 2011
  11. Erik Faye-LundJan 14, 2011
  12. JT OldsJan 14, 2011
  13. Linus TorvaldsJan 14, 2011
  14. Erik Faye-LundJan 14, 2011
  15. Jeff KingJan 14, 2011
  16. Erik Faye-LundJan 14, 2011
  17. Jeff KingJan 14, 2011
  18. Jay SoffianJan 14, 2011
  19. Junio C HamanoJan 14, 2011
  20. Jeff KingJan 14, 2011
  21. Junio C HamanoJan 14, 2011
  22. Jeff KingJan 17, 2011
  23. Erik Faye-LundJan 17, 2011
  24. JT OldsJan 18, 2011
  25. Jay SoffianJan 19, 2011
  26. Tor ArntsenJan 14, 2011
  27. Erik Faye-LundJan 14, 2011
  28. Linus TorvaldsJan 14, 2011
  29. Erik Faye-LundJan 14, 2011
  30. Jeff KingJan 13, 2011

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.