Re: mr: breaking down complex subroutines
On Sun, Feb 19, 2012 at 4:46 PM, Joey Hess wrote: > Adam Spiers wrote: >> I find some parts of the mr script quite hard to follow, and >> consequently to write patches for. For example, loadconfig() has 221 >> lines, and is 8 levels of indentation deep at certain points. Would >> you accept "extract subroutine" refactoring patches which do not >> change the functionality in any way, but simply break down some of the >> longer subroutines into more easily understandable chunks? > > I'm always glad to accept good refactorings. Great! I'll see what I can come up with. ___ vcs-home mailing list vcs-home@lists.madduck.net http://lists.madduck.net/listinfo/vcs-home
Re: mr: breaking down complex subroutines
Adam Spiers wrote: > I find some parts of the mr script quite hard to follow, and > consequently to write patches for. For example, loadconfig() has 221 > lines, and is 8 levels of indentation deep at certain points. Would > you accept "extract subroutine" refactoring patches which do not > change the functionality in any way, but simply break down some of the > longer subroutines into more easily understandable chunks? I'm always glad to accept good refactorings. -- see shy jo signature.asc Description: Digital signature ___ vcs-home mailing list vcs-home@lists.madduck.net http://lists.madduck.net/listinfo/vcs-home
Re: mr: breaking down complex subroutines
On Fri, Feb 17, 2012 at 17:02, Adam Spiers wrote: > Would > you accept "extract subroutine" refactoring patches which do not > change the functionality in any way, but simply break down some of the > longer subroutines into more easily understandable chunks? Personally, I think this would make sense. Richard ___ vcs-home mailing list vcs-home@lists.madduck.net http://lists.madduck.net/listinfo/vcs-home
Re: mr: breaking down complex subroutines
On Fri, Feb 17, 2012 at 4:19 PM, Tommy Stanton wrote: > On Fri, Feb 17, 2012 at 10:02 AM, Adam Spiers 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 ___ vcs-home mailing list vcs-home@lists.madduck.net http://lists.madduck.net/listinfo/vcs-home
Re: mr: breaking down complex subroutines
On Fri, Feb 17, 2012 at 10:02 AM, Adam Spiers 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 ___ vcs-home mailing list vcs-home@lists.madduck.net http://lists.madduck.net/listinfo/vcs-home
mr: breaking down complex subroutines
Hi Joey, I find some parts of the mr script quite hard to follow, and consequently to write patches for. For example, loadconfig() has 221 lines, and is 8 levels of indentation deep at certain points. Would you accept "extract subroutine" refactoring patches which do not change the functionality in any way, but simply break down some of the longer subroutines into more easily understandable chunks? Thanks, Adam ___ vcs-home mailing list vcs-home@lists.madduck.net http://lists.madduck.net/listinfo/vcs-home