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

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

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Dec 16, 2020, 00:50 UTC
Message-ID
<X9lZ0ABtWvjS+Zsv@camp.crustytoothpaste.net>
In-Reply-To
<xmqqv9d4ergd.fsf@gitster.c.googlers.com>
On 2020-12-14 at 00:09:19, Junio C Hamano wrote:
Show 17 quoted lines
> "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 believe the difference is that "echo" adds a newline and you probably wanted "printf" here. But I get your point: we need documentation to explain how to do this that's simple and straightforward, and as we've both pointed out, there isn't any at all. I'll add some.

Show 14 quoted lines
> 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.
That could be a useful tool.
Show 7 quoted lines
> > +	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.
That wasn't intentional.  Will fix.
-- 
brian m. carlson (he/him or they/them)
Houston, Texas, US
Previous: Junio C HamanoNext: Ævar Arnfjörð Bjarmason
Message 7 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.