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

Re: git log displaying wrong account information

From
SMSchanzenbach, Martin <mschanzenbach@posteo.de>
Date
Oct 23, 2021, 06:21 UTC
Message-ID
<F36A97CE-2245-4EF8-B63D-B917166308D8@posteo.de>
In-Reply-To
<YXOopkKXrluffiuX@danh.dev>
Thanks! I did not know about that file.
Show 75 quoted lines
> On 23. Oct 2021, at 08:16, Đoàn Trần Công Danh <congdanhqx@gmail.com> wrote:
> 
> On 2021-10-23 05:58:37+0000, "Schanzenbach, Martin" <mschanzenbach@posteo.de> wrote:
>> Hello,
>> 
>> there is some odd behaviour in "git log" which affects me in various ways:
>> For some reason, it "canonicalizes" the author/commiter information in our repository: https://git.gnunet.org/git/gnunet.git
>> 5 years ago or so I was using another email address for commits. I have been using a different email address since that.
>> 
>> But if you clone this repo, and take a look at a recent commit such
>> as be9b998b3369056c7c8fb0ae84fb4e2a064b496c using "git log", you
>> will see that my email address is actually the old one and different
>> from the _real_ information.
> 
> By old one, do you mean:
> 
> 	Martin Schanzenbach <martin.schanzenbach@aisec.fraunhofer.de>
> 
> It's because you have those entries in .mailmap:
> 
> ---- 8< ----
> Martin Schanzenbach <martin.schanzenbach@aisec.fraunhofer.de> Schanzenbach, Martin <martin.schanzenbach@aisec.fraunhofer.de>
> Martin Schanzenbach <martin.schanzenbach@aisec.fraunhofer.de> Schanzenbach, Martin <mschanzenbach@posteo.de>
> Martin Schanzenbach <martin.schanzenbach@aisec.fraunhofer.de> Martin Schanzenbach <mschanzenbach@posteo.de>
> ---- >8 -----
> 
> Which will map your:
> 
> 	Martin Schanzenbach <mschanzenbach@posteo.de>
> 
> into it.
> 
> 
>> You can see that I correctly set the author/commiter email here
>> using either cgit
>> (https://git.gnunet.org/gnunet.git/commit/?id=be9b998b3369056c7c8fb0ae84fb4e2a064b496c)
>> or a specific format such as
>> 
>> $ git log --pretty=format:"[%h] %cd - Committer: %cn (%ce), Author: %an (%ae)
>> 
>> This is driving me crazy as the information is just plain wrong and
>> when our CI tries to collect a blamelist when sending out
>> notifications, it also uses the info from "git log" instead of the
>> actual author/commiter emails, promptly sending the reports to the
>> wrong account.
> 
> The original value is recorded in the commit. You can retrieve raw
> value with git-cat-file
> 
>> 
>> Any idea what to do?
> 
> Change your mailmap entries to:
> 
> ---- 8< ---
> Martin Schanzenbach <mschanzenbach@posteo.de> Schanzenbach, Martin <martin.schanzenbach@aisec.fraunhofer.de>
> Martin Schanzenbach <mschanzenbach@posteo.de> Schanzenbach, Martin <mschanzenbach@posteo.de>
> Martin Schanzenbach <mschanzenbach@posteo.de> Martin Schanzenbach <martin.schanzenbach@aisec.fraunhofer.de>
> ---- >8 ----
> 
> 
>> I really do not want to rebase and rewrite
>> thousands of commits with questionable success.
>> Doing that locally also does not change the output from "git log", in case you are wondering.
>> This problem will reemerge eventually whenever an author wants to
>> change to another email address it seems so is this a bug?
>> 
>> Any help/pointers appreciated.
>> 
>> Martin
> 
> 
> 
> --
> Danh
Previous: Đoàn Trần Công Danh
Message 3 of 3 in “git log displaying wrong account information”
  1. Schanzenbach, MartinOct 23, 2021
  2. Đoàn Trần Công DanhOct 23, 2021
  3. Schanzenbach, MartinOct 23, 2021

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.