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

Re: [PATCH 1/1] mailmap: support hashed entries in mailmaps

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 14, 2020, 00:09 UTC
Message-ID
<xmqqv9d4ergd.fsf@gitster.c.googlers.com>
In-Reply-To
<20201213010539.544101-2-sandals@crustytoothpaste.net>
"brian m. carlson" <sandals@crustytoothpaste.net> writes:
> Come to think of it, this probably needs documentation as well, so I'll
> wait for any other feedback and then reroll with that in there.
> Hopefully that will clear up any potential confusion.

Not just "where does the hashed entry can appear in the file", but "how exactly does it gets computed" needs to be described. If it is sufficient to do something like

	set x $(echo doe@example.com | sha256sum) &&
	echo "@sha256sum:$2"

that exact procedure must be described to the users in the documentation (note: I know the above is not correct as I looked at the tests---it is a demonstration of the need for a procedure using commonly available tools).

I wonder if somebody may want to do a dedicated tool that lets you
 (1) given an e-mail and/or a name, look-up existing entries and
     show what <name, e-mail> pair it maps to;
 (2) take a new <name, e-mail> pair and add mapping from it to some
     other <name, e-mail> pair.
 (3) take an existing mailmap file, and obfuscate all the existing
     entries.

The first one is covered by "check-mailmap", so the other two could be new features added to the command to be triggered with a command line option.

> +	cat >hashed <<-EOF &&
> +	$GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $hashed_author_name <$GIT_AUTHOR_EMAIL>
> +	EOF
> +	git check-mailmap  "$GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL>" >actual &&

The two spaces after "check-mailmap" is not significant but drew my attention. Let's not do so.

Previous: brian m. carlsonNext: brian m. carlson
Message 6 of 14 in “Hashed mailmap support”
  1. 0/1 Hashed mailmap supportbrian m. carlson, Dec 13, 2020
  2. 1/1 mailmap: support hashed entries in mailmapsbrian m. carlson, Dec 13, 2020
  3. Johannes SixtDec 13, 2020
  4. Johannes SixtDec 13, 2020
  5. brian m. carlsonDec 13, 2020
  6. Junio C HamanoDec 14, 2020
  7. brian m. carlsonDec 16, 2020
  8. Ævar Arnfjörð BjarmasonDec 14, 2020
  9. Phillip WoodDec 15, 2020
  10. Jeff KingDec 15, 2020
  11. Jeff KingDec 15, 2020
  12. Phillip WoodDec 15, 2020
  13. brian m. carlsonDec 18, 2020
  14. Jeff KingDec 18, 2020

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.