{"thread":{"id":"45934","subject":"[BUG] fast-export --anonymize does not maintain fixup! commits","startedAt":"2017-05-11T14:38:45Z","lastAt":"2017-05-12T18:45:14Z","messageCount":3,"participants":["Sebastian Schuberth","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"319409","messageId":"CAHGBnuOzWSCR9wr=TSGoJSnimZDx2Gr-eR3+LFXmpc9m0cv4qw@mail.gmail.com","threadId":"45934","inReplyTo":null,"subject":"[BUG] fast-export --anonymize does not maintain fixup! commits","fromName":"Sebastian Schuberth","fromEmail":"sschuberth@gmail.com","sentAt":"2017-05-11T14:38:17Z","receivedAt":"2017-05-11T14:38:45Z","isPatch":false,"sender":{"key":"sschuberth@gmail.com","avatar":"https://avatars.githubusercontent.com/u/349154?v=4"},"body":"Hi,\n\nI just tried to created an anonymized repo to allow the list to\nreproduce a bug in \"rebase -i\" I discovered in Git 2.13 for Linux\n(Windows is not affected). However, in order to reproduce the bug it's\nimportant to keep the \"fixup!\" prefixes as part of the commit\nmessages. Unfortunately, \"fast-export --anonymize\" does not maintain\nthese (or any other command prefixes in commit messages). Given that\nthe --anonymize option is explicitly designed to help reproducing\nbugs, I consider this to be a bug in the --anonymize option itself.\n\n-- \nSebastian Schuberth\n"},{"id":"319522","messageId":"CAHGBnuOXRdpyozq2BbLFnao6NB0GAL09bsQ-3NtDv6gZTpqvOA@mail.gmail.com","threadId":"45934","inReplyTo":"20170512092212.wpw232jfpp3bnqol@sigill.intra.peff.net","subject":"Re: [BUG] fast-export --anonymize does not maintain fixup! commits","fromName":"Sebastian Schuberth","fromEmail":"sschuberth@gmail.com","sentAt":"2017-05-12T09:39:29Z","receivedAt":"2017-05-12T18:45:10Z","isPatch":false,"sender":{"key":"sschuberth@gmail.com","avatar":"https://avatars.githubusercontent.com/u/349154?v=4"},"body":"On Fri, May 12, 2017 at 11:22 AM, Jeff King <peff@peff.net> wrote:\n\n>> these (or any other command prefixes in commit messages). Given that\n>> the --anonymize option is explicitly designed to help reproducing\n>> bugs, I consider this to be a bug in the --anonymize option itself.\n>\n> Yes, it probably should handle those prefixes.\n>\n> I don't know if I'd call it a bug. Maybe a missing feature. :)\n\nI'd usually agree, but in this case, as I mentioned above, I consider\nthe missing feature to be so essential that the oversight to implement\nit is actually a bug :-)\n\n> So this seems like a good example of that. I think I'd prefer to see us\n> add in known prefixes like \"fixup!\" and \"squash!\" then try to guess what\n> other prefixes might be OK. I don't know of any other command prefixes\n> besides those two, so maybe that's all you were suggesting.\n\nThose were also the only two that came to my mind, but I wanted to\ngive some one who has a better overview the change to amend that list.\n\n> It shouldn't be too hard to add. You'd probably need to make two\n> adjustments to anonymize_commit_message():\n>\n>   1. Teach it to store the mapping of anonymized messages, using\n>      anonymize_mem().\n>\n>   2. Parse \"fixup! <msg>\" and just anonymize_mem() the second half. I\n>      think technically this wouldn't handle a fixup-of-fixup, but I\n>      don't think rebase handles recursive ones anyway.\n\nThanks. I'll give it a try.\n\n-- \nSebastian Schuberth\n"},{"id":"319525","messageId":"20170512092212.wpw232jfpp3bnqol@sigill.intra.peff.net","threadId":"45934","inReplyTo":"CAHGBnuOzWSCR9wr=TSGoJSnimZDx2Gr-eR3+LFXmpc9m0cv4qw@mail.gmail.com","subject":"Re: [BUG] fast-export --anonymize does not maintain fixup! commits","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2017-05-12T09:22:12Z","receivedAt":"2017-05-12T18:45:14Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, May 11, 2017 at 04:38:17PM +0200, Sebastian Schuberth wrote:\n\n> I just tried to created an anonymized repo to allow the list to\n> reproduce a bug in \"rebase -i\" I discovered in Git 2.13 for Linux\n> (Windows is not affected). However, in order to reproduce the bug it's\n> important to keep the \"fixup!\" prefixes as part of the commit\n> messages. Unfortunately, \"fast-export --anonymize\" does not maintain\n> these (or any other command prefixes in commit messages). Given that\n> the --anonymize option is explicitly designed to help reproducing\n> bugs, I consider this to be a bug in the --anonymize option itself.\n\nYes, it probably should handle those prefixes.\n\nI don't know if I'd call it a bug. Maybe a missing feature. :)\n\nMy plan when implementing \"--anonymize\" was to err on the side of\nsimplicity and dropping information, since the most important function\nis not revealing anonymized data. And then we could add back in useful\nbits of data as they were determined to be useful and harmless.\n\nSo this seems like a good example of that. I think I'd prefer to see us\nadd in known prefixes like \"fixup!\" and \"squash!\" then try to guess what\nother prefixes might be OK. I don't know of any other command prefixes\nbesides those two, so maybe that's all you were suggesting.\n\nIt shouldn't be too hard to add. You'd probably need to make two\nadjustments to anonymize_commit_message():\n\n  1. Teach it to store the mapping of anonymized messages, using\n     anonymize_mem().\n\n  2. Parse \"fixup! <msg>\" and just anonymize_mem() the second half. I\n     think technically this wouldn't handle a fixup-of-fixup, but I\n     don't think rebase handles recursive ones anyway.\n\n-Peff\n"}]}