Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id F02086DE19A1 for ; Fri, 3 Apr 2015 16:04:23 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 1.218 X-Spam-Level: * X-Spam-Status: No, score=1.218 tagged_above=-999 required=5 tests=[AWL=0.414, DATE_IN_PAST_12_24=0.804] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9SaogSyDxXe7 for ; Fri, 3 Apr 2015 16:04:22 -0700 (PDT) Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net [87.98.215.224]) by arlo.cworth.org (Postfix) with ESMTPS id 3532B6DE1994 for ; Fri, 3 Apr 2015 16:04:22 -0700 (PDT) Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim 4.80) (envelope-from ) id 1YdXGo-0003TN-VT; Thu, 02 Apr 2015 05:02:23 +0000 Received: (nullmailer pid 1646 invoked by uid 1000); Wed, 01 Apr 2015 07:09:22 -0000 From: David Bremner To: Tomi Ollila , notmuch@notmuchmail.org Subject: Re: [PATCH] test/thread-order: more robust loop exit in case of broken input In-Reply-To: <1427643036-7171-1-git-send-email-tomi.ollila@iki.fi> References: <1427643036-7171-1-git-send-email-tomi.ollila@iki.fi> User-Agent: Notmuch/0.19+96~g703c8f9 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu) Date: Wed, 01 Apr 2015 09:09:22 +0200 Message-ID: <874mp0495p.fsf@maritornes.cs.unb.ca> MIME-Version: 1.0 Content-Type: text/plain Cc: tomi.ollila@iki.fi X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2015 23:04:24 -0000 Tomi Ollila writes: > When creating $THREADS data it may end of not having 'None' at all > or the numbers in line output yields a loop. > > To avoid loop the value in current array index is set to 'None' > so that if the same item is reached again the loop will end. > > Also empty string as next array index will end the loop. lgtm d