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, 12 Dec 2008 01:40:14 +0100 Message-ID: <87zlj2xm35.wl%seb@cine7.net> References: <87wsei1uvp.wl%seb@cine7.net> <200812051145.09732.jnareb@gmail.com> <878wqmz3pl.wl%seb@cine7.net> <200812120113.47051.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 12 01:40:40 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 1LAw54-0005hX-0R for gcvg-git-2@gmane.org; Fri, 12 Dec 2008 01:40:34 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756619AbYLLAjK convert rfc822-to-quoted-printable (ORCPT ); Thu, 11 Dec 2008 19:39:10 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756335AbYLLAjJ (ORCPT ); Thu, 11 Dec 2008 19:39:09 -0500 Received: from smtp.nimag.net ([62.220.136.11]:41454 "EHLO smtp.nimag.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756033AbYLLAjI convert rfc822-to-8bit (ORCPT ); Thu, 11 Dec 2008 19:39:08 -0500 Received: from crookshanks.cine7.net (85-218-42-96.dclient.lsne.ch [85.218.42.96]) by smtp.nimag.net (Postfix) with ESMTP id 0E86FCB0AA3; Fri, 12 Dec 2008 01:39:03 +0100 (CET) In-Reply-To: <200812120113.47051.jnareb@gmail.com> User-Agent: Wanderlust/2.14.0 (Africa) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: At Fri, 12 Dec 2008 01:13:45 +0100, Jakub Narebski wrote: > I just tried, it works but we first need to sort @projects by > category. >=20 > I don't understand. > [...] > I propose to change it to: Well in my previous iteration of the patch (v3), the printing of projects with categories is done using: foreach my $cat (sort keys %categories) { So everything was already sorted by category (and then by whichever property you picked inside each category). You seemed okay with it, but requested that I documented that behaviour in the commit log. To maintain the same result with your proposed change (which is what I submitted in my patch), we need to sort by categories first (AFAIK Perl sort retains the original order inside equivalence classes of comparison key?), otherwise splice(projlist, from, to) doesn't return the expected subset. --=20 S=E9bastien Cevey / inso.cc