bagger is a Perl script that converts a linear git history into something resembling the "bag of patches" approach taken by Darcs and Camp.

I was amused by this Camp video showing automatic construction of branches and wanted to do a similar thing with git.

What bagger does is (slowly) determine which patches do not depend on each other and can be applied in parallel. It does this by attempting to glue bits of text together, paying no attention to the semantics of the result, so its output is amusing but not actually useful.

Before:

linear history

After:

fucking mess