git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Schanzenbach, Martin" <mschanzenbach@posteo.de>
To: "Đoàn Trần Công Danh" <congdanhqx@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git log displaying wrong account information
Date: Sat, 23 Oct 2021 06:21:05 +0000	[thread overview]
Message-ID: <F36A97CE-2245-4EF8-B63D-B917166308D8@posteo.de> (raw)
In-Reply-To: <YXOopkKXrluffiuX@danh.dev>

[-- Attachment #1: Type: text/plain, Size: 3025 bytes --]

Thanks! I did not know about that file.

> 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


[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2021-10-23  6:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-23  5:58 git log displaying wrong account information Schanzenbach, Martin
2021-10-23  6:16 ` Đoàn Trần Công Danh
2021-10-23  6:21   ` Schanzenbach, Martin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F36A97CE-2245-4EF8-B63D-B917166308D8@posteo.de \
    --to=mschanzenbach@posteo.de \
    --cc=congdanhqx@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).