Petr Baudis wrote: > Dear diary, on Thu, Jun 09, 2005 at 01:24:07PM CEST, I got a letter > where Dan Holmsand told me that... > > I'm sorry, but those two patches are still way too big and therefore > basically unreviewable. Could you please split them further to a > per-feature patches? > > A good place to start would be changing the [PATCH 2/6] color refactor > to actually _replace_ the color stuff of cg-log and cg-diff with the new > common cg-Xlib code - but please don't change the default colors in that > patch yet (that is because you shouldn't assume in your earlier patches > that later patches will be applied, or applied in the form you send > them; I don't know about the less search thing yet, since I didn't test > it, since I don't have a focused patch for it)., Ok, here's another one to start with. cg-diff only, this time around. It's much simpler, since cg-diff got a lot more similar to your stuff due to your excellent optparse-ification. If this is still too big, I'm not really sure how to go about this. And I'm gonna get into even more trouble with cg-log. My code is essentially a rewrite, in order to reduce the incredible amount of forking going on in the current code. But let's take it one step at a time... /dan --- [PATCH] Rewrite cg-diff colorization, add diffstat and reverse This collects all of the colorization logic into the setup_colors method, in preparation for codesharing with cg-log. In the process, we go from awk to sed. This also cleans up option handling, in order to provide better error checking and error messages. And skip the rather unncessary xargs usage. diffstat and "reverse diff" output options are added. diffstat output requires a small fix of "pager" in cg-Xlib, in order not to lose leading whitespace when color isn't used. Signed-off-by: Dan Holmsand ---