mr: breaking down complex subroutines

Adam Spiers vcs-home at adamspiers.org
Fri Feb 17 17:34:42 CET 2012


On Fri, Feb 17, 2012 at 4:19 PM, Tommy Stanton <tommystanton at gmail.com> wrote:
> On Fri, Feb 17, 2012 at 10:02 AM, Adam Spiers <vcs-home at adamspiers.org> wrote:
>> consequently to write patches for.  For example, loadconfig() has 221
>> lines, and is 8 levels of indentation deep at certain points.  Would
>
> The code excerpt of loadconfig() being discussed can be glanced at here:
> http://git.kitenet.net/?p=mr.git;a=blob;f=mr;h=8408c61d5407d56301f081e000b01bf02d0a547f;hb=HEAD#l1204

Thanks Tommy.  The other big candidate for refactoring is action()
which is 164 lines long and 6 levels deep in places:

http://git.kitenet.net/?p=mr.git;a=blob;f=mr;h=8408c61d5407d56301f081e000b01bf02d0a547f;hb=HEAD#l684


More information about the vcs-home mailing list