git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Sebastian Schuberth <sschuberth@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [BUG] fast-export --anonymize does not maintain fixup! commits
Date: Fri, 12 May 2017 05:22:12 -0400	[thread overview]
Message-ID: <20170512092212.wpw232jfpp3bnqol@sigill.intra.peff.net> (raw)
In-Reply-To: <CAHGBnuOzWSCR9wr=TSGoJSnimZDx2Gr-eR3+LFXmpc9m0cv4qw@mail.gmail.com>

On Thu, May 11, 2017 at 04:38:17PM +0200, Sebastian Schuberth wrote:

> I just tried to created an anonymized repo to allow the list to
> reproduce a bug in "rebase -i" I discovered in Git 2.13 for Linux
> (Windows is not affected). However, in order to reproduce the bug it's
> important to keep the "fixup!" prefixes as part of the commit
> messages. Unfortunately, "fast-export --anonymize" does not maintain
> these (or any other command prefixes in commit messages). Given that
> the --anonymize option is explicitly designed to help reproducing
> bugs, I consider this to be a bug in the --anonymize option itself.

Yes, it probably should handle those prefixes.

I don't know if I'd call it a bug. Maybe a missing feature. :)

My plan when implementing "--anonymize" was to err on the side of
simplicity and dropping information, since the most important function
is not revealing anonymized data. And then we could add back in useful
bits of data as they were determined to be useful and harmless.

So this seems like a good example of that. I think I'd prefer to see us
add in known prefixes like "fixup!" and "squash!" then try to guess what
other prefixes might be OK. I don't know of any other command prefixes
besides those two, so maybe that's all you were suggesting.

It shouldn't be too hard to add. You'd probably need to make two
adjustments to anonymize_commit_message():

  1. Teach it to store the mapping of anonymized messages, using
     anonymize_mem().

  2. Parse "fixup! <msg>" and just anonymize_mem() the second half. I
     think technically this wouldn't handle a fixup-of-fixup, but I
     don't think rebase handles recursive ones anyway.

-Peff

  reply	other threads:[~2017-05-12  9:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-11 14:38 [BUG] fast-export --anonymize does not maintain fixup! commits Sebastian Schuberth
2017-05-12  9:22 ` Jeff King [this message]
2017-05-12  9:39   ` Sebastian Schuberth

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=20170512092212.wpw232jfpp3bnqol@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=sschuberth@gmail.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.
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).