Re: offtopic: how to break huge patch into smaller independent patches?

From: William Lee Irwin III
Date: Tue Sep 14 2004 - 16:00:29 EST


On Tue, Sep 14, 2004 at 01:48:37PM -0600, Chris Friesen wrote:
> Its kind of offtopic, but I hoped that someone might have some pointers
> since the kernel developers deal with so many patches.
> I've been given a massive kernel patch that makes a whole bunch of
> conceptually independent changes.
> Does anyone have any advice on how to break it up into independent patches?

It's hard work. It's sometimes even harder than writing the patch
itself. To handle this, I would:

(a) identify the conceptually independent changes
(b) rewrite the conceptually independent changes separately in series
(c) look for the results of (b) that are too large, and try to find
some way to represent them as a series conceptually independent
changes.
(d) if (c) returned a nonzero number of results, recurse to (b)

Yes, this means you have to rewrite the stuff altogether. This is not
quite as hard as it sounds, as you can largely "discover" what the
rewrites should be by filtering changes. But it's still relatively hard.

Identifying conceptually independent changes has no universal rules, so
that may also be hard.


-- wli
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/