From mboxrd@z Thu Jan 1 00:00:00 1970 From: tim.nordell at logicpd.com (Tim Nordell) Date: Mon, 29 Feb 2016 14:51:46 -0600 Subject: [PATCH 2/3] ui-repolist: Restructure internal logic to be more extensible In-Reply-To: <20160228130242.GB1766@serenity.lan> References: <1456520339-32708-1-git-send-email-tim.nordell@logicpd.com> <1456520339-32708-3-git-send-email-tim.nordell@logicpd.com> <20160228130242.GB1766@serenity.lan> Message-ID: <56D4AF62.6020609@logicpd.com> On 02/28/16 07:02, John Keeping wrote: > On Fri, Feb 26, 2016 at 02:58:58PM -0600, Tim Nordell wrote: >> The internal logic has been restructured so that there is a "walking" >> routine that filters the repo list based on the visible criteria, and >> subsequently calls a given callback for each repo found. Additionally, >> split out generating a table line for a given repo, and a table line >> for a given section. This makes this more loosely coupled and allows >> reuse of more logic for changes to the way the repo list is displayed. >> This patch does not make any functional changes to the system and is >> a reorganization of the existing logic only. > > There's a lot going on in this patch that makes it very hard to review. > It would be easier if it were broken down into: > > extract struct repolist_ctx > extract the new generate_repolist() function > add repolist_walk_visible() > Thanks for the initial glance and suggestion. I'll break it apart along these lines. > It would also be helpful to mention in the commit message why > repolist_walk_visible() is needed: in a following patch we will be > adding a variant that prints only section headers. Noted. > There are also various style problems here, but they're similar to > earlier patches and the Linux kernel's scripts/checkpatch.pl script > catches them. Yeah, I didn't realize that CGIT was following the kernel's style guide. I looked in CGIT's folder, but I didn't expect it to be following documentation inside the submodule. I'll grab the kernel's style checker and vet the changes against that. - Tim