Re: [BUG] fast-export --anonymize does not maintain fixup! commits
On Fri, May 12, 2017 at 11:22 AM, Jeff King <peff@peff.net> wrote:
Show 7 quoted lines
>> 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.
Show 9 quoted lines
> 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