From patchwork Fri May 15 17:21:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Junio C Hamano X-Patchwork-Id: 11552751 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 68155139A for ; Fri, 15 May 2020 17:21:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 51E722073E for ; Fri, 15 May 2020 17:21:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=pobox.com header.i=@pobox.com header.b="rpBEPqTO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726313AbgEORVZ (ORCPT ); Fri, 15 May 2020 13:21:25 -0400 Received: from pb-smtp1.pobox.com ([64.147.108.70]:62686 "EHLO pb-smtp1.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726219AbgEORVY (ORCPT ); Fri, 15 May 2020 13:21:24 -0400 Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 5ACDE4DCDD; Fri, 15 May 2020 13:21:22 -0400 (EDT) (envelope-from gitster@pobox.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; s=sasl; bh=zjRuNjd0Ps88AQ1wqrXyJQODT dA=; b=rpBEPqTOZWouM012ySPdr2/ZAomYlQWNbmI9S+pokAn+iZfyIzZNpJ23c xu0TXlreE/axIElGo9X9WlER4/fllBAWT4ZU2J5VxgtLhiOwQVFXJjOTYb59eoVW nLitbnaR7eTGVFVJsd2e4oJeYh5d45gWsdeybs6bj6JykQUjc0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; q=dns; s=sasl; b=TcXkRblf7lNc9/teHMm AydIHjvNgOge+wAeWY5/FMzhYg70Sz4gIQQzsy9W6AqutCt17EeZ2YnIW/atXsGX wAxUF/Vr7fKcsTsnlWPx1/ayF6wt1bsSBfIA7mD/QEgJdji/K4V2WIIWHCsOsFfl /h9LN6RXJOjX5LycJxeUUtFA= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 4CAE64DCDB; Fri, 15 May 2020 13:21:22 -0400 (EDT) (envelope-from gitster@pobox.com) Received: from pobox.com (unknown [35.196.173.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id C7A3F4DCD9; Fri, 15 May 2020 13:21:21 -0400 (EDT) (envelope-from gitster@pobox.com) From: Junio C Hamano To: git@vger.kernel.org Cc: =?utf-8?q?Carlo_Marcelo_Arenas_Bel=C3=B3n?= , Alban Gruin , =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBE?= =?utf-8?b?YW5o?= , Johannes Schindelin Subject: [PATCH 1/2] Revert "t/test_lib: avoid naked bash arrays in file_lineno" Date: Fri, 15 May 2020 10:21:16 -0700 Message-Id: <20200515172117.155238-2-gitster@pobox.com> X-Mailer: git-send-email 2.27.0-rc0 In-Reply-To: <20200515172117.155238-1-gitster@pobox.com> References: <20200515172117.155238-1-gitster@pobox.com> MIME-Version: 1.0 X-Pobox-Relay-ID: 7F1F19C2-96D0-11EA-BAC9-C28CBED8090B-77302942!pb-smtp1.pobox.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org This reverts commit 303775a25f0b4ac5d6ad2e96eb4404c24209cad8; instead of trying to salvage the tap-breaking change, let's revert the whole thing for now for the upcoming release. The enhancement can be re-attempted in the next cycle. Signed-off-by: Junio C Hamano --- t/test-lib.sh | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/t/test-lib.sh b/t/test-lib.sh index baf94546da..1b221951a8 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -677,16 +677,14 @@ die () { file_lineno () { test -z "$GIT_TEST_FRAMEWORK_SELFTEST" && test -n "$BASH" || return 0 - eval ' - local i - for i in ${!BASH_SOURCE[*]} - do - case $i,"${BASH_SOURCE[$i]##*/}" in - 0,t[0-9]*.sh) echo "t/${BASH_SOURCE[$i]}:$LINENO: ${1+$1: }"; return;; - *,t[0-9]*.sh) echo "t/${BASH_SOURCE[$i]}:${BASH_LINENO[$(($i-1))]}: ${1+$1: }"; return;; - esac - done - ' + local i + for i in ${!BASH_SOURCE[*]} + do + case $i,"${BASH_SOURCE[$i]##*/}" in + 0,t[0-9]*.sh) echo "t/${BASH_SOURCE[$i]}:$LINENO: ${1+$1: }"; return;; + *,t[0-9]*.sh) echo "t/${BASH_SOURCE[$i]}:${BASH_LINENO[$(($i-1))]}: ${1+$1: }"; return;; + esac + done } GIT_EXIT_OK=