From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?S=E9bastien?= Cevey Subject: Re: [PATCH v3 3/3] gitweb: Optional grouping of projects by category Date: Fri, 05 Dec 2008 03:32:09 +0100 Message-ID: <87bpvr1hee.wl%seb@cine7.net> References: <87wsei1uvp.wl%seb@cine7.net> <87iqq022gz.wl%seb@cine7.net> <87hc5k22dr.wl%seb@cine7.net> <200812050308.52891.jnareb@gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: git@vger.kernel.org, Junio C Hamano , Petr Baudis , Gustavo Sverzut Barbieri To: Jakub Narebski X-From: git-owner@vger.kernel.org Fri Dec 05 03:32:54 2008 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1L8QUW-0004Na-Cr for gcvg-git-2@gmane.org; Fri, 05 Dec 2008 03:32:28 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754742AbYLECbL convert rfc822-to-quoted-printable (ORCPT ); Thu, 4 Dec 2008 21:31:11 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754705AbYLECbJ (ORCPT ); Thu, 4 Dec 2008 21:31:09 -0500 Received: from smtp.nimag.net ([62.220.136.11]:51184 "EHLO smtp.nimag.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753221AbYLECbI convert rfc822-to-8bit (ORCPT ); Thu, 4 Dec 2008 21:31:08 -0500 Received: from crookshanks.cine7.net (85-218-42-178.dclient.lsne.ch [85.218.42.178]) by smtp.nimag.net (Postfix) with ESMTP id 2F764CB0A94; Fri, 5 Dec 2008 03:31:01 +0100 (CET) In-Reply-To: <200812050308.52891.jnareb@gmail.com> User-Agent: Wanderlust/2.14.0 (Africa) X-Message-Flag: OUTLOOK ERROR: Large chicken feathers stuck in power supply fan. Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: At Fri, 5 Dec 2008 03:08:52 +0100, Jakub Narebski wrote: > Nice... but perhaps it would be better to simply pass $from / $to to > build_projlist_by_category function, and have in %categories only > projects which are shown... Ah you're right, we could do that, I hadn't thought of it. Sounds cleaner than the $from/$to dance I did in this patch. > well, unless filtered out in print_project_rows() by $show_ctags; so > I think that there is nonzero probability of empty (no project > shown) categories. Mh indeed, in fact this could happen any time we reach one of the 'next' statements in the loop in print_project_rows(), when performing search, tag filtering, etc... Actually, assuming the project list is split into page, this can also lead to empty pages (if no project on the page matches the filter). To avoid empty categories, it's a bit tricky since the header is printed before we determine whether there are matching projects.. I need to read the code more carefully, but it seems that one solution would be to add a function that determines whether a project should be displayed or not (according to tags and search and forks); then we can map this function on the list of projects. I could do it if it sounds sane to you. > I don't think that the games we play with $from / $to would be enough= =2E > Check what happens (I think that it wouldn't work correctly) if we ha= ve > something like that: >=20 > project | category | shown > -------------------------- > 1 | A | > 2 | A | > 3 | B | Y > 4 | C | Y > 5 | B | Y > 6 | C | > 7 | C | AFAIK this cannot happen with the current code, since projects are grouped by category (according to the foreach on categories). > I'll try to examine the code in more detail later... currently I don'= t > know why but I can't git-am the second patch (this patch) correctly..= =2E This is the third patch, are you sure you applied 1 and 2 before? Thanks for your careful and supportive comments! --=20 S=E9bastien Cevey / inso.cc