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

Re: [PATCH v2] Introduce new configuation option to override committer information

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 20, 2011, 19:00 UTC
Message-ID
<7vaaivs8n7.fsf@alter.siamese.dyndns.org>
In-Reply-To
<201101111542.15185.trast@student.ethz.ch>
Thomas Rast <trast@student.ethz.ch> writes:
Show 14 quoted lines
> Well, now that I'm rethinking it, the weird thing is that it does not
> override in the way that the user intuitively might expect.
>
> Assume we also had user.authoremail for completeness, and you do
>
>   git config --global user.authoremail author@example.com
>   git config --global user.committeremail committer@example.com
>   git config user.email user@example.com
>
> Probably the user would expect this to result in a uniform
> user@example.com identity for the current repo, but I don't think we
> can twist it that way with the current config infrastructure.  The
> obvious option of having user.{author,committer}* override the more
> generic user.* would be contrary to that intuition.

The thing is that the "intuition" is not so cut-and-dried. "email" is indeed more generic than "authoremail", so it is intuitive for the latter to override the former. But "$HOME/.gitconfig" is fallback default for the repository specific .git/config so it also is intuitive for anything in the latter to override whatever is in the former. Now you have a conflicting "more specific authoremail in more generic $HOME/.gitconfig vs more generic email in more specific .git/config---which wins?" situation.

Is there a way to document the rule of precedence clearly? For this particular case, recommending against setting author/committer-email in the fallback default $HOME/.gitconfig in the Documentation/config.txt might be sufficient.

But I am still not convinced why two need to be custom-set differently when both need to name _you_. After all, Author and Committer are both identifiers taken from the same namespace to identify real people, so if you want to use one value for the committer to name _you_, I don't see a sane reason why you want a different name to name the same _you_ in the author field.

The specific use case in the thread talks about KDE workflow interpreting the committer identifier in a particular way as a reason for it to be set to a particular value, but does not clarify why the author has to be different from that particular value for the committer.

Previous: Thomas RastNext: Stephen Kelly
Message 15 of 19 in “Wish: make commiter email address configurable per-repo”
  1. Stephen KellyJan 7, 2011
  2. Thomas RastJan 7, 2011
  3. Stephen KellyJan 7, 2011
  4. Thomas RastJan 7, 2011
  5. Stephen KellyJan 7, 2011
  6. Erik Faye-LundJan 7, 2011
  7. Junio C HamanoJan 20, 2011
  8. Introduce new configuation option to override committer informationRamkumar Ramachandra, Jan 8, 2011
  9. Stephen KellyJan 8, 2011
  10. Introduce new configuation option to override committer informationRamkumar Ramachandra, Jan 9, 2011
  11. Jonathan NiederJan 9, 2011
  12. Stephen KellyJan 11, 2011
  13. Ramkumar RamachandraJan 11, 2011
  14. Thomas RastJan 11, 2011
  15. Junio C HamanoJan 20, 2011
  16. Stephen KellyJan 20, 2011
  17. Thomas RastJan 20, 2011
  18. Stephen KellyJan 20, 2011
  19. Jonathan NiederJan 20, 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.