Thread (14 messages) 14 messages, 6 authors, 2020-12-18

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

From: brian m. carlson <hidden>
Date: 2020-12-16 00:51:30

On 2020-12-14 at 00:09:19, Junio C Hamano wrote:
"brian m. carlson" [off-list ref] writes:
quoted
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.
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.
quoted
+	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

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help