All of lore.kernel.org
 help / color / mirror / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/1] mailmap: support hashed entries in mailmaps
Date: Wed, 16 Dec 2020 00:50:24 +0000	[thread overview]
Message-ID: <X9lZ0ABtWvjS+Zsv@camp.crustytoothpaste.net> (raw)
In-Reply-To: <xmqqv9d4ergd.fsf@gitster.c.googlers.com>

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

On 2020-12-14 at 00:09:19, Junio C Hamano wrote:
> "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.

> 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.

> > +	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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

  reply	other threads:[~2020-12-16  0:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-13  1:05 [PATCH 0/1] Hashed mailmap support brian m. carlson
2020-12-13  1:05 ` [PATCH 1/1] mailmap: support hashed entries in mailmaps brian m. carlson
2020-12-13  9:34   ` Johannes Sixt
2020-12-13  9:45     ` Johannes Sixt
2020-12-13 20:38       ` brian m. carlson
2020-12-14  0:09   ` Junio C Hamano
2020-12-16  0:50     ` brian m. carlson [this message]
2020-12-14 11:54   ` Ævar Arnfjörð Bjarmason
2020-12-15 11:13   ` Phillip Wood
2020-12-15  1:48 ` [PATCH 0/1] Hashed mailmap support Jeff King
2020-12-15  2:40   ` Jeff King
2020-12-15 11:15   ` Phillip Wood
2020-12-18  2:29   ` brian m. carlson
2020-12-18  5:56     ` Jeff King

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

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

  git send-email \
    --in-reply-to=X9lZ0ABtWvjS+Zsv@camp.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.