git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Deadname rewriting
@ 2019-06-15  1:54 Phil Hord
  2019-06-15  7:27 ` Andreas Schwab
  2019-06-15  8:19 ` Ævar Arnfjörð Bjarmason
  0 siblings, 2 replies; 8+ messages in thread
From: Phil Hord @ 2019-06-15  1:54 UTC (permalink / raw)
  To: Git

I know name-scrubbing is already covered in filter-branch and other
places. But we have a scenario becoming more common that makes it a
more sensitive topic.

At $work we have a long time employee who has changed their name from
Alice to Bob.  Bob doesn't want anyone to call him "Alice" anymore and
is prone to be offended if they do.  This is called "deadnaming".

We are able to convince most of our work tools to expunge the deadname
from usage anywhere, but git stubbornly calls Bob "Alice" whenever
someone asks for "git blame" or checks in "git log".

We could rewrite history with filter-branch, but that's quite
disruptive.  I found some alternatives.

.mailmap seems perfect for this task, but it doesn't work everywhere
(blame, log, etc.).  Also, it requires the deadname to be forever
proclaimed in the .mailmap file itself.

`git replace` works rather nicely, except all of Bob's old commits
show "replaced" in the decorator list. Also, it doesn't propagate well
from the central server since `refs/replaces` namespace isn't fetched
normally.  But in case anyone wants it, here's what I did:

git log --author=alice.smith --format="%h" --all |
   while read hash ; do
      GIT_EDITOR='sed -i -e s/Alice Smith/Bob Smith/g' -e
's/alice.smith/bob.smith/' \
      git replace --edit $hash
   done
git push origin 'refs/replace/*:refs/replace/*'

I'd quite like the .mailmap solution to work, and I might flesh that
out that some day.

It feels like `.git/info/grafts` would work the best if it could be
distributed with the project, but I'm pretty sure that's a non-starter
for many reasons.

Any other ideas?  Has anyone here encountered this already?

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-06-21 22:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-15  1:54 Deadname rewriting Phil Hord
2019-06-15  7:27 ` Andreas Schwab
2019-06-15  8:19 ` Ævar Arnfjörð Bjarmason
2019-06-17 21:21   ` Philip Oakley
2019-06-17 22:33     ` Ævar Arnfjörð Bjarmason
2019-06-21 21:12   ` Phil Hord
2019-06-21 21:34     ` Ævar Arnfjörð Bjarmason
2019-06-21 22:16       ` CB Bailey

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