git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [BUG] fast-export --anonymize does not maintain fixup! commits
@ 2017-05-11 14:38 Sebastian Schuberth
  2017-05-12  9:22 ` Jeff King
  0 siblings, 1 reply; 3+ messages in thread
From: Sebastian Schuberth @ 2017-05-11 14:38 UTC (permalink / raw)
  To: Git Mailing List

Hi,

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.

-- 
Sebastian Schuberth

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

* Re: [BUG] fast-export --anonymize does not maintain fixup! commits
  2017-05-11 14:38 [BUG] fast-export --anonymize does not maintain fixup! commits Sebastian Schuberth
@ 2017-05-12  9:22 ` Jeff King
  2017-05-12  9:39   ` Sebastian Schuberth
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff King @ 2017-05-12  9:22 UTC (permalink / raw)
  To: Sebastian Schuberth; +Cc: Git Mailing List

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

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

* Re: [BUG] fast-export --anonymize does not maintain fixup! commits
  2017-05-12  9:22 ` Jeff King
@ 2017-05-12  9:39   ` Sebastian Schuberth
  0 siblings, 0 replies; 3+ messages in thread
From: Sebastian Schuberth @ 2017-05-12  9:39 UTC (permalink / raw)
  To: Jeff King; +Cc: Git Mailing List

On Fri, May 12, 2017 at 11:22 AM, Jeff King <peff@peff.net> wrote:

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

I'd usually agree, but in this case, as I mentioned above, I consider
the missing feature to be so essential that the oversight to implement
it is actually a bug :-)

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

Those were also the only two that came to my mind, but I wanted to
give some one who has a better overview the change to amend that list.

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

Thanks. I'll give it a try.

-- 
Sebastian Schuberth

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

end of thread, other threads:[~2017-05-12  9:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-11 14:38 [BUG] fast-export --anonymize does not maintain fixup! commits Sebastian Schuberth
2017-05-12  9:22 ` Jeff King
2017-05-12  9:39   ` Sebastian Schuberth

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