From patchwork Tue Mar 5 21:25:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Beat Bolli X-Patchwork-Id: 13583020 Received: from mail-gateway-shared15.cyon.net (mail-gateway-shared15.cyon.net [194.126.200.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 61B1C129A99 for ; Tue, 5 Mar 2024 21:26:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.126.200.68 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709673994; cv=none; b=nbDLoHB31+jYyft95lf1290UklWFZyoatsERIRGE3k9mA/+CSOag1U+tdIbDgvd5VfpGCeeVf9DIiMfjGkq4IOm/Ai5pD5xwxGIPIZyulIZzn+QtZr3YFBItuwOw15qT8xrSY0DFF+/ijKDZW8CbiPwpUwMAO/oGTSBMbTPHe84= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709673994; c=relaxed/simple; bh=xR+QIoXcuCkFMZo5dOZTZhD8mUNnJl1WrNy1JgNe8OM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kQYtePFwvvIgNfYz6inn/mM3GfRG4TJ/uhr4Q5d7HlcpkmBCJYS8UD4jOKRcC3WFvmZdHgl9S/NZ9PUXu1TTRYwURYNxxZ2szTGAIXKh6ht2j8YoOhQAS/JA8BnDfbnqyZO5sQYSFj8icz5cyxMBWpjYiSzY/DiTevWqCdDhJD4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li; spf=pass smtp.mailfrom=drbeat.li; arc=none smtp.client-ip=194.126.200.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=drbeat.li Received: from s019.cyon.net ([149.126.4.28]) by mail-gateway-shared15.cyon.net with esmtpsa (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim) (envelope-from ) id 1rhcIt-000000002P3-2qzE for git@vger.kernel.org; Tue, 05 Mar 2024 22:26:28 +0100 Received: from [10.20.10.231] (port=45192 helo=mail.cyon.ch) by s019.cyon.net with esmtpa (Exim 4.96.2) (envelope-from ) id 1rhcIs-006KZM-1r; Tue, 05 Mar 2024 22:26:26 +0100 Received: from minibeat.bolli (minibeat.bolli [192.168.11.3]) by drbeat.li (Postfix) with SMTP id 49C3E180036; Tue, 5 Mar 2024 22:26:25 +0100 (CET) Received: by minibeat.bolli (sSMTP sendmail emulation); Tue, 05 Mar 2024 22:26:25 +0100 From: "Beat Bolli" To: git@vger.kernel.org Cc: Junio C Hamano , Beat Bolli Subject: [PATCH 01/22] doc: avoid redundant use of cat Date: Tue, 5 Mar 2024 22:25:00 +0100 Message-ID: <20240305212533.12947-2-dev+git@drbeat.li> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240305212533.12947-1-dev+git@drbeat.li> References: <20240305212533.12947-1-dev+git@drbeat.li> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s019.cyon.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - drbeat.li X-Get-Message-Sender-Via: s019.cyon.net: authenticated_id: ig@drbeat.li X-Authenticated-Sender: s019.cyon.net: ig@drbeat.li The update-hook-example.txt script uses this anti-pattern twice. Call grep with the input file name directy. While at it, merge the two consecutive grep calls. Signed-off-by: Beat Bolli --- Documentation/howto/update-hook-example.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/howto/update-hook-example.txt b/Documentation/howto/update-hook-example.txt index 151ee84cebce..4e727deedd21 100644 --- a/Documentation/howto/update-hook-example.txt +++ b/Documentation/howto/update-hook-example.txt @@ -100,7 +100,7 @@ info "The user is: '$username'" if test -f "$allowed_users_file" then - rc=$(cat $allowed_users_file | grep -v '^#' | grep -v '^$' | + rc=$(grep -Ev '^(#|$)' $allowed_users_file | while read heads user_patterns do # does this rule apply to us? @@ -138,7 +138,7 @@ info "'$groups'" if test -f "$allowed_groups_file" then - rc=$(cat $allowed_groups_file | grep -v '^#' | grep -v '^$' | + rc=$(grep -Ev '^(#|$)' $allowed_groups_file | while read heads group_patterns do # does this rule apply to us? From patchwork Tue Mar 5 21:25:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Beat Bolli X-Patchwork-Id: 13583023 Received: from mail-gateway-shared15.cyon.net (mail-gateway-shared15.cyon.net [194.126.200.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C6EDE12AAD1 for ; Tue, 5 Mar 2024 21:26:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.126.200.68 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709673996; cv=none; b=kL45CINS/yGog+h25N94N3cPSvXphapYBVFz6k1DQowj8cYGQtrtUCwkJwtQ8/cGB65oB0PHKU7LyeneE80bCJeMIXSc0eC8MSi1WPWI1lbgYJfOpE5qvJ1QuqUAxRlWHVmD/B1tZRsfbPB83h/L4WISl1Mf4J1Ape6efFuZm1k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709673996; c=relaxed/simple; bh=/4kQIjNj8lRUPyTRvJ665yaTf57jzk0wC+IWRZIZDqc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=G1jGhMQYDeHMpyi/a/kfmXLcy24TiFGMn95PsyNfMEwakhFJkKJdEiY+5UXPCnE34SkZmk8XK8fmwXnqXOpy1nUvsk356wA8YQ8gJlNG0RFBlVDC6PMLGW+Tr99B11POryDDDEb65QErulT5WDUOmv2TlG4JBzSqnRLqcira7Bo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li; spf=pass smtp.mailfrom=drbeat.li; arc=none smtp.client-ip=194.126.200.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=drbeat.li Received: from s019.cyon.net ([149.126.4.28]) by mail-gateway-shared15.cyon.net with esmtpsa (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim) (envelope-from ) id 1rhcIu-000000002P9-3Ks7 for git@vger.kernel.org; Tue, 05 Mar 2024 22:26:29 +0100 Received: from [10.20.10.231] (port=45740 helo=mail.cyon.ch) by s019.cyon.net with esmtpa (Exim 4.96.2) (envelope-from ) id 1rhcIt-006KZe-2F; Tue, 05 Mar 2024 22:26:27 +0100 Received: from minibeat.bolli (minibeat.bolli [192.168.11.3]) by drbeat.li (Postfix) with SMTP id 5E85C18012F; Tue, 5 Mar 2024 22:26:26 +0100 (CET) Received: by minibeat.bolli (sSMTP sendmail emulation); Tue, 05 Mar 2024 22:26:26 +0100 From: "Beat Bolli" To: git@vger.kernel.org Cc: Junio C Hamano , Beat Bolli Subject: [PATCH 02/22] contrib/subtree/t: avoid redundant use of cat Date: Tue, 5 Mar 2024 22:25:01 +0100 Message-ID: <20240305212533.12947-3-dev+git@drbeat.li> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240305212533.12947-1-dev+git@drbeat.li> References: <20240305212533.12947-1-dev+git@drbeat.li> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s019.cyon.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - drbeat.li X-Get-Message-Sender-Via: s019.cyon.net: authenticated_id: ig@drbeat.li X-Authenticated-Sender: s019.cyon.net: ig@drbeat.li Signed-off-by: Beat Bolli --- contrib/subtree/t/t7900-subtree.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/subtree/t/t7900-subtree.sh b/contrib/subtree/t/t7900-subtree.sh index ca4df5be8324..c3bd2a58b941 100755 --- a/contrib/subtree/t/t7900-subtree.sh +++ b/contrib/subtree/t/t7900-subtree.sh @@ -63,7 +63,7 @@ test_create_pre2_32_repo () { git -C "$1" log -1 --format=%B HEAD^2 >msg && test_commit -C "$1-sub" --annotate sub2 && git clone --no-local "$1" "$1-clone" && - new_commit=$(cat msg | sed -e "s/$commit/$tag/" | git -C "$1-clone" commit-tree HEAD^2^{tree}) && + new_commit=$(sed -e "s/$commit/$tag/" msg | git -C "$1-clone" commit-tree HEAD^2^{tree}) && git -C "$1-clone" replace HEAD^2 $new_commit } From patchwork Tue Mar 5 21:25:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Beat Bolli X-Patchwork-Id: 13583021 Received: from mail-gateway-shared15.cyon.net (mail-gateway-shared15.cyon.net [194.126.200.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7EF4D12A153 for ; Tue, 5 Mar 2024 21:26:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.126.200.68 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709673994; cv=none; b=UzuQLKIdNNbLST3ECPDIj99Iqsd/UYuOhbnxzrrU1IhZ7s40aEN3xmbP9YPXdS3EKfXmulGRhtZ8vpb0hrHrT3fmHTjLIwkteQwxMSOIKMoGrmJfTM7UI9KtvUaUPdKUsx/aqb5jhaQcdoZPqhOWGX4oFlndvgMUVTSaiBWkvfM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709673994; c=relaxed/simple; bh=zeF7UP34ynW6WksuNgeb+X47YU21XHAm4VZdawEE5+o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rLLqfovdbpcsI9QmlvkOmWEo1qTWFRiLr2VydFCx8l90FB3r5omI6BDMjrOEYAmjA57QzU2fXztSPmZ1oSrsbsSsefdSreJDEfCKJmIn4f1AHjsumrYwzojgSVRP4upe4DFP96uxG5rCRle0idtMp/rQUA94wXmcsNhE3M+mSZc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li; spf=pass smtp.mailfrom=drbeat.li; arc=none smtp.client-ip=194.126.200.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=drbeat.li Received: from s019.cyon.net ([149.126.4.28]) by mail-gateway-shared15.cyon.net with esmtpsa (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim) (envelope-from ) id 1rhcIv-000000002PO-3k6i for git@vger.kernel.org; Tue, 05 Mar 2024 22:26:30 +0100 Received: from [10.20.10.232] (port=30144 helo=mail.cyon.ch) by s019.cyon.net with esmtpa (Exim 4.96.2) (envelope-from ) id 1rhcIu-006KZy-2T; Tue, 05 Mar 2024 22:26:28 +0100 Received: from minibeat.bolli (minibeat.bolli [192.168.11.3]) by drbeat.li (Postfix) with SMTP id 75A85180036; Tue, 5 Mar 2024 22:26:27 +0100 (CET) Received: by minibeat.bolli (sSMTP sendmail emulation); Tue, 05 Mar 2024 22:26:27 +0100 From: "Beat Bolli" To: git@vger.kernel.org Cc: Junio C Hamano , Beat Bolli Subject: [PATCH 03/22] t/lib-cvs.sh: avoid redundant use of cat Date: Tue, 5 Mar 2024 22:25:02 +0100 Message-ID: <20240305212533.12947-4-dev+git@drbeat.li> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240305212533.12947-1-dev+git@drbeat.li> References: <20240305212533.12947-1-dev+git@drbeat.li> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s019.cyon.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - drbeat.li X-Get-Message-Sender-Via: s019.cyon.net: authenticated_id: ig@drbeat.li X-Authenticated-Sender: s019.cyon.net: ig@drbeat.li Signed-off-by: Beat Bolli --- t/lib-cvs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/lib-cvs.sh b/t/lib-cvs.sh index 32b347337908..57b9b2db9b3f 100644 --- a/t/lib-cvs.sh +++ b/t/lib-cvs.sh @@ -71,8 +71,8 @@ test_cmp_branch_tree () { find . -type d -name .git -prune -o -type f -print ) | sort >module-git-"$1".list && test_cmp module-cvs-"$1".list module-git-"$1".list && - cat module-cvs-"$1".list | while read f + while read f do test_cmp_branch_file "$1" "$f" || return 1 - done + done X-Patchwork-Id: 13583022 Received: from mail-gateway-shared15.cyon.net (mail-gateway-shared15.cyon.net [194.126.200.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6A77D12A16C for ; Tue, 5 Mar 2024 21:26:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.126.200.68 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709673995; cv=none; b=jNnkR6PLKF/dyxaF4NJAl9judykn1Oegt6DOmGHO5e5+Bqk5sFC31DBab/AW4nsrRnHZ3kCs6bEvHqz8rb3ebXajEjUQp9lCUnanyvb/xnxVPkVNfzEhvorRUmG7ap/xzi3JHU6Y+DAyH+oK/QZl49h10TNgM/ArTG64HtkNI6o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709673995; c=relaxed/simple; bh=8A2LM+K1ukjOftczHLsu1O5QkSmZ5eJIh4zRAdWHC4A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XkEY6gVIMAXUEnrligfOTRvlTenVmmt/LH+Vw84B6toXlaxiAXtB9/mCbIg3HYP8ktxXfsLK5KRKSf1itXXFaABGk3yoxxk1okk/B0ni7aVjPxg/ukxxBU8P66Zg6RRFWK2i/8PAkT0YEYNZiPYGiSvqvzjTU4FPDehQcDXtglc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li; spf=pass smtp.mailfrom=drbeat.li; arc=none smtp.client-ip=194.126.200.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=drbeat.li Received: from s019.cyon.net ([149.126.4.28]) by mail-gateway-shared15.cyon.net with esmtpsa (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim) (envelope-from ) id 1rhcIw-000000002Po-4Bx4 for git@vger.kernel.org; Tue, 05 Mar 2024 22:26:31 +0100 Received: from [10.20.10.230] (port=27380 helo=mail.cyon.ch) by s019.cyon.net with esmtpa (Exim 4.96.2) (envelope-from ) id 1rhcIv-006KaL-2r; Tue, 05 Mar 2024 22:26:29 +0100 Received: from minibeat.bolli (minibeat.bolli [192.168.11.3]) by drbeat.li (Postfix) with SMTP id 8C0BF18012F; Tue, 5 Mar 2024 22:26:28 +0100 (CET) Received: by minibeat.bolli (sSMTP sendmail emulation); Tue, 05 Mar 2024 22:26:28 +0100 From: "Beat Bolli" To: git@vger.kernel.org Cc: Junio C Hamano , Beat Bolli Subject: [PATCH 04/22] t/annotate-tests.sh: avoid redundant use of cat Date: Tue, 5 Mar 2024 22:25:03 +0100 Message-ID: <20240305212533.12947-5-dev+git@drbeat.li> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240305212533.12947-1-dev+git@drbeat.li> References: <20240305212533.12947-1-dev+git@drbeat.li> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s019.cyon.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - drbeat.li X-Get-Message-Sender-Via: s019.cyon.net: authenticated_id: ig@drbeat.li X-Authenticated-Sender: s019.cyon.net: ig@drbeat.li Signed-off-by: Beat Bolli --- t/annotate-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/annotate-tests.sh b/t/annotate-tests.sh index 5e21e84f3884..87572459e4b8 100644 --- a/t/annotate-tests.sh +++ b/t/annotate-tests.sh @@ -532,7 +532,7 @@ test_expect_success 'blame -L :funcname with userdiff driver' ' "$(cat file.template)" && test_commit --author "B " \ "change" "$fortran_file" \ - "$(cat file.template | sed -e s/ChangeMe/IWasChanged/)" && + "$(sed -e s/ChangeMe/IWasChanged/ file.template)" && check_count -f "$fortran_file" -L:RIGHT A 3 B 1 ' From patchwork Tue Mar 5 21:25:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Beat Bolli X-Patchwork-Id: 13583024 Received: from mail-gateway-shared15.cyon.net (mail-gateway-shared15.cyon.net [194.126.200.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 86F2912BEA3 for ; Tue, 5 Mar 2024 21:26:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.126.200.68 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709673996; cv=none; b=dVZ3wUYOVi6HYtg9beXeVMdgNGy7L+AzQHk63CjyzrcJzTWZ1lUPZ9ISbxhuAFUg62xc7nBRdOpEdlng9sYhZi7g+eED6Wa+d6JruLBL0U5TXJriDL25zHWZsDzlcwy/gB0Vx0Gz2JaADLH8NzLESnIeHIR+LpQbnDiXhY07Td4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709673996; c=relaxed/simple; bh=n+VW9olPmiDPnqzGmqm+lcCHo/bvpWFh/wizfy1/1EA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=a9bxvLarMQWICyUxsQkuFqICiSNgT69IBnm8+jErnyWb1FvN/IEfeptPWN4Z+w5KJ29K4lbnSXcvR6PMrYN4DD5rC+7TqiwksAOr2O6eqB++FXn1+X8uQsBWDug52zTihqqnYsXwmdVQ7GZUpt1tr3u1irib64rs8R7ellTCErU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li; spf=pass smtp.mailfrom=drbeat.li; arc=none smtp.client-ip=194.126.200.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=drbeat.li Received: from s019.cyon.net ([149.126.4.28]) by mail-gateway-shared15.cyon.net with esmtpsa (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim) (envelope-from ) id 1rhcIy-000000002Q2-02CM for git@vger.kernel.org; Tue, 05 Mar 2024 22:26:32 +0100 Received: from [10.20.10.233] (port=49178 helo=mail.cyon.ch) by s019.cyon.net with esmtpa (Exim 4.96.2) (envelope-from ) id 1rhcIw-006Kb5-2v; Tue, 05 Mar 2024 22:26:30 +0100 Received: from minibeat.bolli (minibeat.bolli [192.168.11.3]) by drbeat.li (Postfix) with SMTP id 9FDBA180036; Tue, 5 Mar 2024 22:26:29 +0100 (CET) Received: by minibeat.bolli (sSMTP sendmail emulation); Tue, 05 Mar 2024 22:26:29 +0100 From: "Beat Bolli" To: git@vger.kernel.org Cc: Junio C Hamano , Beat Bolli Subject: [PATCH 05/22] t/perf: avoid redundant use of cat Date: Tue, 5 Mar 2024 22:25:04 +0100 Message-ID: <20240305212533.12947-6-dev+git@drbeat.li> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240305212533.12947-1-dev+git@drbeat.li> References: <20240305212533.12947-1-dev+git@drbeat.li> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s019.cyon.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - drbeat.li X-Get-Message-Sender-Via: s019.cyon.net: authenticated_id: ig@drbeat.li X-Authenticated-Sender: s019.cyon.net: ig@drbeat.li Take care to redirect stdin, otherwise the output of wc would also contain the file name. Signed-off-by: Beat Bolli --- t/perf/repos/inflate-repo.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/perf/repos/inflate-repo.sh b/t/perf/repos/inflate-repo.sh index fcfc992b5b02..412e4b450b16 100755 --- a/t/perf/repos/inflate-repo.sh +++ b/t/perf/repos/inflate-repo.sh @@ -33,7 +33,7 @@ do done git ls-tree -r HEAD >GEN_src_list -nr_src_files=$(cat GEN_src_list | wc -l) +nr_src_files=$(wc -l X-Patchwork-Id: 13583025 Received: from mail-gateway-shared15.cyon.net (mail-gateway-shared15.cyon.net [194.126.200.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 66DB812CD8B for ; Tue, 5 Mar 2024 21:26:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.126.200.68 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709673997; cv=none; b=orYYuLRrTmbajMsgRVzhtWSrC2SuV+kXHYNOvF2OEd0W32zyb4YaaE702oTNOHzwZW+khy18RVWFrhuCPr+krdJvBGcsm/QpEucQL6AkKX0iADYGJUlR8/XpJfNN/LNiG/7tCXwebIUstMymyE1zSdzI0+EojCc7eE7Da7WVhhU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709673997; c=relaxed/simple; bh=eNpX5PWTT2ye9/O6n05IALrMxhreaX+sAQLf45At9k8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=KH46p3MFg9hOSTTKMa/I0rnJkJCa7GW9Om6oKPTUApmBTVmyGK1TvQkHwBtuGJ8OtzYgqh6yWLHIi/4hZFWWuCU0htWioXG5RHrjqd2npZAaNo+jj6t82OXOI52D8ZAzecfm4k09pTX8UP1M1Ixm5SlWLR4zBtlBYpDI+gjlixU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li; spf=pass smtp.mailfrom=drbeat.li; arc=none smtp.client-ip=194.126.200.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=drbeat.li Received: from s019.cyon.net ([149.126.4.28]) by mail-gateway-shared15.cyon.net with esmtpsa (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim) (envelope-from ) id 1rhcIz-000000002QG-0dVO for git@vger.kernel.org; Tue, 05 Mar 2024 22:26:33 +0100 Received: from [10.20.10.231] (port=47490 helo=mail.cyon.ch) by s019.cyon.net with esmtpa (Exim 4.96.2) (envelope-from ) id 1rhcIy-006KbR-09; Tue, 05 Mar 2024 22:26:32 +0100 Received: from minibeat.bolli (minibeat.bolli [192.168.11.3]) by drbeat.li (Postfix) with SMTP id B424018012F; Tue, 5 Mar 2024 22:26:30 +0100 (CET) Received: by minibeat.bolli (sSMTP sendmail emulation); Tue, 05 Mar 2024 22:26:30 +0100 From: "Beat Bolli" To: git@vger.kernel.org Cc: Junio C Hamano , Beat Bolli Subject: [PATCH 06/22] t/t0*: avoid redundant uses of cat Date: Tue, 5 Mar 2024 22:25:05 +0100 Message-ID: <20240305212533.12947-7-dev+git@drbeat.li> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240305212533.12947-1-dev+git@drbeat.li> References: <20240305212533.12947-1-dev+git@drbeat.li> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s019.cyon.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - drbeat.li X-Get-Message-Sender-Via: s019.cyon.net: authenticated_id: ig@drbeat.li X-Authenticated-Sender: s019.cyon.net: ig@drbeat.li Signed-off-by: Beat Bolli --- t/t0002-gitfile.sh | 2 +- t/t0011-hashmap.sh | 2 +- t/t0028-working-tree-encoding.sh | 4 ++-- t/t0204-gettext-reencode-sanity.sh | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/t/t0002-gitfile.sh b/t/t0002-gitfile.sh index 736516cc6a47..bf3bf604abe3 100755 --- a/t/t0002-gitfile.sh +++ b/t/t0002-gitfile.sh @@ -40,7 +40,7 @@ test_expect_success 'final setup + check rev-parse --git-dir' ' test_expect_success 'check hash-object' ' echo "foo" >bar && - SHA=$(cat bar | git hash-object -w --stdin) && + SHA=$(git hash-object -w --stdin > expect && echo size >> in && echo 64 39 >> expect && - cat in | test-tool hashmap > out && + test-tool hashmap out && test_cmp expect out ' diff --git a/t/t0028-working-tree-encoding.sh b/t/t0028-working-tree-encoding.sh index 1b55f59c237c..ad151a346708 100755 --- a/t/t0028-working-tree-encoding.sh +++ b/t/t0028-working-tree-encoding.sh @@ -131,8 +131,8 @@ do test_when_finished "rm -f crlf.utf${i}.raw lf.utf${i}.raw" && test_when_finished "git reset --hard HEAD^" && - cat lf.utf8.raw | write_utf${i} >lf.utf${i}.raw && - cat crlf.utf8.raw | write_utf${i} >crlf.utf${i}.raw && + write_utf${i} lf.utf${i}.raw && + write_utf${i} crlf.utf${i}.raw && cp crlf.utf${i}.raw eol.utf${i} && cat >expectIndexLF <<-EOF && diff --git a/t/t0204-gettext-reencode-sanity.sh b/t/t0204-gettext-reencode-sanity.sh index 4f2e0dcb02bd..310a4500125f 100755 --- a/t/t0204-gettext-reencode-sanity.sh +++ b/t/t0204-gettext-reencode-sanity.sh @@ -82,7 +82,7 @@ test_expect_success GETTEXT_ISO_LOCALE 'gettext.c: git init UTF-8 -> ISO-8859-1' printf "Bjó til tóma Git lind" >expect && LANGUAGE=is LC_ALL="$is_IS_iso_locale" git init repo >actual && test_when_finished "rm -rf repo" && - grep "^$(cat expect | iconv -f UTF-8 -t ISO8859-1) " actual + grep "^$(iconv -f UTF-8 -t ISO8859-1 X-Patchwork-Id: 13583026 Received: from mail-gateway-shared15.cyon.net (mail-gateway-shared15.cyon.net [194.126.200.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E945E12AAD1 for ; Tue, 5 Mar 2024 21:26:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.126.200.68 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709673998; cv=none; b=N/DQnC3Ay4t5no7orgYGj4hEWeYAsgkBaAtGIiTxZgsHFTVwuRD0CvYi8TTP2aW8mwe8mz/mnqEcF0hK+hzQiVp/XDM5xCGkG3GscJzcFrPE9vkitrlaUbeZQMwIL+Z8EgHmmSxVoMjARSgTpwNt8XO2xfJxQDoG8fxdT0wzbOY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709673998; c=relaxed/simple; bh=3Hmr5W/p8/eAxujN7qAv/x8HCoZJgIIlMUpVDJfttCU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Qbfa8+nIs8E0XBlOwRdTIbge4jjOlzMEt2KINro3RMF+IUdf7B51enQryjPKKWGm3EuB2IZmckltcGIo6cUTrVBbufDG4jIGBIGNoLB5clC2Da/mm6JrLN5rdpvzoJHjht8B1nQVbagBNAIYlGrM893RXiy7z/iPOrPGKg4iF4Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li; spf=pass smtp.mailfrom=drbeat.li; arc=none smtp.client-ip=194.126.200.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=drbeat.li Received: from s019.cyon.net ([149.126.4.28]) by mail-gateway-shared15.cyon.net with esmtpsa (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim) (envelope-from ) id 1rhcJ0-000000002Qg-1Byz for git@vger.kernel.org; Tue, 05 Mar 2024 22:26:34 +0100 Received: from [10.20.10.230] (port=28996 helo=mail.cyon.ch) by s019.cyon.net with esmtpa (Exim 4.96.2) (envelope-from ) id 1rhcIz-006Kbr-0P; Tue, 05 Mar 2024 22:26:33 +0100 Received: from minibeat.bolli (minibeat.bolli [192.168.11.3]) by drbeat.li (Postfix) with SMTP id CA8C3180036; Tue, 5 Mar 2024 22:26:31 +0100 (CET) Received: by minibeat.bolli (sSMTP sendmail emulation); Tue, 05 Mar 2024 22:26:31 +0100 From: "Beat Bolli" To: git@vger.kernel.org Cc: Junio C Hamano , Beat Bolli Subject: [PATCH 07/22] t/t1*: avoid redundant uses of cat Date: Tue, 5 Mar 2024 22:25:06 +0100 Message-ID: <20240305212533.12947-8-dev+git@drbeat.li> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240305212533.12947-1-dev+git@drbeat.li> References: <20240305212533.12947-1-dev+git@drbeat.li> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s019.cyon.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - drbeat.li X-Get-Message-Sender-Via: s019.cyon.net: authenticated_id: ig@drbeat.li X-Authenticated-Sender: s019.cyon.net: ig@drbeat.li Signed-off-by: Beat Bolli --- t/t1007-hash-object.sh | 6 +++--- t/t1091-sparse-checkout-builtin.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/t/t1007-hash-object.sh b/t/t1007-hash-object.sh index ac3d173767ae..64aea3848606 100755 --- a/t/t1007-hash-object.sh +++ b/t/t1007-hash-object.sh @@ -124,8 +124,8 @@ test_expect_success 'check that appropriate filter is invoke when --path is used path0_sha=$(git hash-object --path=file0 file1) && test "$file0_sha" = "$path0_sha" && test "$file1_sha" = "$path1_sha" && - path1_sha=$(cat file0 | git hash-object --path=file1 --stdin) && - path0_sha=$(cat file1 | git hash-object --path=file0 --stdin) && + path1_sha=$(git hash-object --path=file1 --stdin check-rules-file out && sed -n "/^S /!s/^. //p" out >ls-files && From patchwork Tue Mar 5 21:25:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Beat Bolli X-Patchwork-Id: 13583027 Received: from mail-gateway-shared15.cyon.net (mail-gateway-shared15.cyon.net [194.126.200.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 24DED12D208 for ; Tue, 5 Mar 2024 21:26:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.126.200.68 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709674000; cv=none; b=aMUWPFqW0k4BO+qUqCR+Amhro0J8R9ni9xenQ6iy6daObrlyUdNXVzd4WwTOdbr/CCxOTZdRrsxrGq3DwCSORAOKmXZYbbzdu+kBlR6HtD3Okkwnwp/h2xRW+k9GBp3JUQpE0ZwgFPHkNJtsJZvCAV5l0zuzDxUKmICS6A032cU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709674000; c=relaxed/simple; bh=Ik93UwLT6PJDlx/oQ+5BFA5BdY/8gSGQnBEpKQbRwvU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IiLYk3GWGv7X+23CycEqHC4oFPsrtm27cuftatHTl/BiNoven6u3yNnlWWliOlU4BmgLe0C7UedqjvOtmQ8mL1SCg8HNoh7PKKJ6/veGy07fHEfkG4LDag/9aNMzKNM4qDArR1j9LG9Ma6U20T9M6/M3l/1Y9xUsuCJWm+pQiR0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li; spf=pass smtp.mailfrom=drbeat.li; arc=none smtp.client-ip=194.126.200.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=drbeat.li Received: from s019.cyon.net ([149.126.4.28]) by mail-gateway-shared15.cyon.net with esmtpsa (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim) (envelope-from ) id 1rhcJ1-000000002Qv-1HWs for git@vger.kernel.org; Tue, 05 Mar 2024 22:26:35 +0100 Received: from [10.20.10.233] (port=50562 helo=mail.cyon.ch) by s019.cyon.net with esmtpa (Exim 4.96.2) (envelope-from ) id 1rhcJ0-006KcG-0e; Tue, 05 Mar 2024 22:26:34 +0100 Received: from minibeat.bolli (minibeat.bolli [192.168.11.3]) by drbeat.li (Postfix) with SMTP id E005418012F; Tue, 5 Mar 2024 22:26:32 +0100 (CET) Received: by minibeat.bolli (sSMTP sendmail emulation); Tue, 05 Mar 2024 22:26:32 +0100 From: "Beat Bolli" To: git@vger.kernel.org Cc: Junio C Hamano , Beat Bolli Subject: [PATCH 08/22] t/t3*: avoid redundant uses of cat Date: Tue, 5 Mar 2024 22:25:07 +0100 Message-ID: <20240305212533.12947-9-dev+git@drbeat.li> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240305212533.12947-1-dev+git@drbeat.li> References: <20240305212533.12947-1-dev+git@drbeat.li> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s019.cyon.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - drbeat.li X-Get-Message-Sender-Via: s019.cyon.net: authenticated_id: ig@drbeat.li X-Authenticated-Sender: s019.cyon.net: ig@drbeat.li Signed-off-by: Beat Bolli --- t/t3200-branch.sh | 2 +- t/t3321-notes-stripspace.sh | 8 ++++---- t/t3920-crlf-messages.sh | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index e36f4d15f2dd..c394273527cb 100755 --- a/t/t3200-branch.sh +++ b/t/t3200-branch.sh @@ -579,7 +579,7 @@ EOF # ...and that the comments for those sections are also # preserved. - cat config.branch | sed "s/\"source\"/\"dest\"/" >expect && + sed "s/\"source\"/\"dest\"/" config.branch >expect && sed -n -e "/Note the lack/,\$p" .git/config >actual && test_cmp expect actual ' diff --git a/t/t3321-notes-stripspace.sh b/t/t3321-notes-stripspace.sh index 088a852dd47a..beca34605672 100755 --- a/t/t3321-notes-stripspace.sh +++ b/t/t3321-notes-stripspace.sh @@ -442,7 +442,7 @@ test_expect_success 'add note by specifying "-C", "--no-stripspace" is the defau ${LF} EOF - cat expect | git hash-object -w --stdin >blob && + git hash-object -w --stdin blob && git notes add -C $(cat blob) && git notes show >actual && test_cmp expect actual && @@ -468,7 +468,7 @@ test_expect_success 'reuse note by specifying "-C" and "--stripspace"' ' second-line EOF - cat data | git hash-object -w --stdin >blob && + git hash-object -w --stdin blob && git notes add --stripspace -C $(cat blob) && git notes show >actual && test_cmp expect actual @@ -492,7 +492,7 @@ test_expect_success 'reuse with "-C" and add note with "-m", "-m" will stripspac third-line EOF - cat data | git hash-object -w --stdin >blob && + git hash-object -w --stdin blob && git notes add -C $(cat blob) -m "third-line" && git notes show >actual && test_cmp expect actual @@ -511,7 +511,7 @@ test_expect_success 'add note with "-m" and reuse note with "-C", "-C" will not second-line EOF - cat data | git hash-object -w --stdin >blob && + git hash-object -w --stdin blob && git notes add -m "first-line" -C $(cat blob) && git notes show >actual && test_cmp expect actual diff --git a/t/t3920-crlf-messages.sh b/t/t3920-crlf-messages.sh index 67fd2345affd..5eed640a6825 100755 --- a/t/t3920-crlf-messages.sh +++ b/t/t3920-crlf-messages.sh @@ -10,7 +10,7 @@ LIB_CRLF_BRANCHES="" create_crlf_ref () { branch="$1" && cat >.crlf-orig-$branch.txt && - cat .crlf-orig-$branch.txt | append_cr >.crlf-message-$branch.txt && + append_cr <.crlf-orig-$branch.txt >.crlf-message-$branch.txt && grep 'Subject' .crlf-orig-$branch.txt | tr '\n' ' ' | sed 's/[ ]*$//' | tr -d '\n' >.crlf-subject-$branch.txt && grep 'Body' .crlf-orig-$branch.txt | append_cr >.crlf-body-$branch.txt && LIB_CRLF_BRANCHES="${LIB_CRLF_BRANCHES} ${branch}" && From patchwork Tue Mar 5 21:25:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Beat Bolli X-Patchwork-Id: 13583028 Received: from mail-gateway-shared15.cyon.net (mail-gateway-shared15.cyon.net [194.126.200.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 86ADE12CD8B for ; Tue, 5 Mar 2024 21:26:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.126.200.68 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709674000; cv=none; b=OORq+cgGxT3Dr1QjGVcTqN/d8yLdQgNiltgQOnoHctS8mOBlHwhukZC6a+Lj/p4yGTMm6w8z1+2pqEi6Vix7P2VJKNKbV+WtdToiC36HcpKURqn/BKguG5r24G+azSpxJlCn3A7p8/fkexnGZ5/QKNvmyRzvGf42WtTnlQMxhc4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709674000; c=relaxed/simple; bh=N/pdj6XusojQL4eU8krFGbCGtjURhu62+Yd/P4EVWtM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=U/t6kl01ZXFsa1rkC9iPqzRt8lm3l1SK/ELolVHh0u72G6+KrwlH9EXqg2X1XO5xn2jd4Fwhh9jycW52kOnE/w9uIk01NBvy46s7uYBLGFvOcp5XH2d0JEQME97GzR/GWETZaNH9Tu2jbqehiBuCHxqtzwCUOY5OBCJcCPJ3tog= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li; spf=pass smtp.mailfrom=drbeat.li; arc=none smtp.client-ip=194.126.200.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=drbeat.li Received: from s019.cyon.net ([149.126.4.28]) by mail-gateway-shared15.cyon.net with esmtpsa (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim) (envelope-from ) id 1rhcJ2-000000002RL-1oPE for git@vger.kernel.org; Tue, 05 Mar 2024 22:26:36 +0100 Received: from [10.20.10.233] (port=51162 helo=mail.cyon.ch) by s019.cyon.net with esmtpa (Exim 4.96.2) (envelope-from ) id 1rhcJ1-006Kd3-12; Tue, 05 Mar 2024 22:26:35 +0100 Received: from minibeat.bolli (minibeat.bolli [192.168.11.3]) by drbeat.li (Postfix) with SMTP id 013C1180036; Tue, 5 Mar 2024 22:26:33 +0100 (CET) Received: by minibeat.bolli (sSMTP sendmail emulation); Tue, 05 Mar 2024 22:26:33 +0100 From: "Beat Bolli" To: git@vger.kernel.org Cc: Junio C Hamano , Beat Bolli Subject: [PATCH 09/22] t/t4*: avoid redundant uses of cat Date: Tue, 5 Mar 2024 22:25:08 +0100 Message-ID: <20240305212533.12947-10-dev+git@drbeat.li> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240305212533.12947-1-dev+git@drbeat.li> References: <20240305212533.12947-1-dev+git@drbeat.li> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s019.cyon.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - drbeat.li X-Get-Message-Sender-Via: s019.cyon.net: authenticated_id: ig@drbeat.li X-Authenticated-Sender: s019.cyon.net: ig@drbeat.li Signed-off-by: Beat Bolli --- t/t4020-diff-external.sh | 2 +- t/t4150-am.sh | 2 +- t/t4205-log-pretty-formats.sh | 2 +- t/t4301-merge-tree-write-tree.sh | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/t/t4020-diff-external.sh b/t/t4020-diff-external.sh index c1ac09ecc714..fdd865f7c38d 100755 --- a/t/t4020-diff-external.sh +++ b/t/t4020-diff-external.sh @@ -232,7 +232,7 @@ keep_only_cr () { test_expect_success 'external diff with autocrlf = true' ' test_config core.autocrlf true && GIT_EXTERNAL_DIFF=./fake-diff.sh git diff && - test $(wc -l < crlfed.txt) = $(cat crlfed.txt | keep_only_cr | wc -c) + test $(wc -l < crlfed.txt) = $(keep_only_cr raw && - cat raw | lf_to_nul || return 1 + lf_to_nul expect && # the trailing NUL is already produced so we do not need to # output another one diff --git a/t/t4301-merge-tree-write-tree.sh b/t/t4301-merge-tree-write-tree.sh index 12ac43687366..578641467753 100755 --- a/t/t4301-merge-tree-write-tree.sh +++ b/t/t4301-merge-tree-write-tree.sh @@ -313,7 +313,7 @@ test_expect_success 'rename/add handling' ' # First, check that the bar that appears at stage 3 does not # correspond to an individual blob anywhere in history # - hash=$(cat out | tr "\0" "\n" | head -n 3 | grep 3.bar | cut -f 2 -d " ") && + hash=$(tr "\0" "\n" all_blobs && ! grep $hash all_blobs && @@ -380,7 +380,7 @@ test_expect_success SYMLINKS 'rename/add, where add is a mode conflict' ' # First, check that the bar that appears at stage 3 does not # correspond to an individual blob anywhere in history # - hash=$(cat out | tr "\0" "\n" | head -n 3 | grep 3.bar | cut -f 2 -d " ") && + hash=$(tr "\0" "\n" all_blobs && ! grep $hash all_blobs && @@ -630,8 +630,8 @@ test_expect_success 'mod6: chains of rename/rename(1to2) and add/add via collidi # conflict entries do not appear as individual blobs anywhere # in history. # - hash1=$(cat out | tr "\0" "\n" | head | grep 2.four | cut -f 2 -d " ") && - hash2=$(cat out | tr "\0" "\n" | head | grep 3.two | cut -f 2 -d " ") && + hash1=$(tr "\0" "\n" all_blobs && ! grep $hash1 all_blobs && ! grep $hash2 all_blobs && From patchwork Tue Mar 5 21:25:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Beat Bolli X-Patchwork-Id: 13583029 Received: from mail-gateway-shared15.cyon.net (mail-gateway-shared15.cyon.net [194.126.200.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C3C3512AAD1 for ; Tue, 5 Mar 2024 21:26:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.126.200.68 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709674001; cv=none; b=SUrkdGnt7QDnxCX0jD+ggUHPTTI1s66JrbMQgjCBCciF22ohREOsohdKtmQyWu+vDfCMC0+FxAIC4UZP/mUL0OWrZSBvY7WKa6Ch3bqdl9siuRa2Dkn9VNFa21jK6mqyYRzBpnlGbP+4+4E0o/l+txg7XjPfIuF0nqNcgTIKgQc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709674001; c=relaxed/simple; bh=b9EAjqiUnNzNOBj2w/QZBJxXrKDtv+hUxrLayEYfGLc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tBlebvNKQ3oq1W6PbvWcBCWTuuHPkXJEUwp8GLTNQV6+CAdQu56nc+RJQ2mebJHTBlUKYHQMyteXmxfCgp05cOZWrXQs6p95ww7XTperssZIErYPBf7eF0bTXrZ1WdHb1UjhMCDxiGt2SnY1Q670EZBUlQcLaPX5JfkXziaEmSw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li; spf=pass smtp.mailfrom=drbeat.li; arc=none smtp.client-ip=194.126.200.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=drbeat.li Received: from s019.cyon.net ([149.126.4.28]) by mail-gateway-shared15.cyon.net with esmtpsa (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim) (envelope-from ) id 1rhcJ3-000000002Rd-23z7 for git@vger.kernel.org; Tue, 05 Mar 2024 22:26:38 +0100 Received: from [10.20.10.232] (port=32894 helo=mail.cyon.ch) by s019.cyon.net with esmtpa (Exim 4.96.2) (envelope-from ) id 1rhcJ2-006KdT-1F; Tue, 05 Mar 2024 22:26:36 +0100 Received: from minibeat.bolli (minibeat.bolli [192.168.11.3]) by drbeat.li (Postfix) with SMTP id 16FB118012F; Tue, 5 Mar 2024 22:26:35 +0100 (CET) Received: by minibeat.bolli (sSMTP sendmail emulation); Tue, 05 Mar 2024 22:26:35 +0100 From: "Beat Bolli" To: git@vger.kernel.org Cc: Junio C Hamano , Beat Bolli Subject: [PATCH 10/22] t/t5*: avoid redundant uses of cat Date: Tue, 5 Mar 2024 22:25:09 +0100 Message-ID: <20240305212533.12947-11-dev+git@drbeat.li> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240305212533.12947-1-dev+git@drbeat.li> References: <20240305212533.12947-1-dev+git@drbeat.li> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s019.cyon.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - drbeat.li X-Get-Message-Sender-Via: s019.cyon.net: authenticated_id: ig@drbeat.li X-Authenticated-Sender: s019.cyon.net: ig@drbeat.li Signed-off-by: Beat Bolli --- t/t5100-mailinfo.sh | 2 +- t/t5317-pack-objects-filter-objects.sh | 2 +- t/t5534-push-signed.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/t/t5100-mailinfo.sh b/t/t5100-mailinfo.sh index 654d8cf3ee00..c8d06554541c 100755 --- a/t/t5100-mailinfo.sh +++ b/t/t5100-mailinfo.sh @@ -70,7 +70,7 @@ test_expect_success 'respect NULs' ' git mailsplit -d3 -o. "$DATA/nul-plain" && test_cmp "$DATA/nul-plain" 001 && - (cat 001 | git mailinfo msg patch) && + git mailinfo msg patch <001 && test_line_count = 4 patch ' diff --git a/t/t5317-pack-objects-filter-objects.sh b/t/t5317-pack-objects-filter-objects.sh index 2ff3eef9a3b8..79552d6ef7f6 100755 --- a/t/t5317-pack-objects-filter-objects.sh +++ b/t/t5317-pack-objects-filter-objects.sh @@ -455,7 +455,7 @@ test_expect_success 'setup r1 - delete loose blobs' ' test_parse_ls_files_stage_oids expected && - for id in `cat expected | sed "s|..|&/|"` + for id in `sed "s|..|&/|" expected` do rm r1/.git/objects/$id || return 1 done diff --git a/t/t5534-push-signed.sh b/t/t5534-push-signed.sh index b4bc24691c81..c91a62b77afc 100755 --- a/t/t5534-push-signed.sh +++ b/t/t5534-push-signed.sh @@ -303,7 +303,7 @@ test_expect_success GPGSM 'fail without key and heed user.signingkey x509' ' EOF sed -n -e "s/^nonce /NONCE=/p" -e "/^$/q" dst/push-cert ) >expect.in && - key=$(cat "${GNUPGHOME}/trustlist.txt" | cut -d" " -f1 | tr -d ":") && + key=$(cut -d" " -f1 <"${GNUPGHOME}/trustlist.txt" | tr -d ":") && sed -e "s/^KEY=/KEY=${key}/" expect.in >expect && noop=$(git rev-parse noop) && From patchwork Tue Mar 5 21:25:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Beat Bolli X-Patchwork-Id: 13583032 Received: from mail-gateway-shared15.cyon.net (mail-gateway-shared15.cyon.net [194.126.200.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8F1E912D219 for ; Tue, 5 Mar 2024 21:26:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.126.200.68 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709674005; cv=none; b=j1IhAPav7XFLQvhjfzFyiZOC0HORdmgp0MNS2SANe0Kri4aH13civSRsJuFPHO8vwHC3ZDCFKGt/kTvqitnUQyDupoJwqcfNzCMEfLzr9No9QypzDtTiXGUgr8DMOXWOCLjWzg1yytrjRjD5KLHh9nIF2K0160fgkpTz/biHQz0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709674005; c=relaxed/simple; bh=JovhWDeiCpwd158IsnVIofnu9jLKY4GQWGMRZfKoGC4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Exh6tIK/K8CW42LdA26DmnUkcST/HSziqUyMrPmkaerP28fsrgO/vOl1cLfiKxbsBv4kSRVaUeKE8M8wh6E6gY2HuuSquoWy9g4iq8Kxa7DBg9Dx16oXIdgP0vEAZhvfIzzrlBma3H9k+My6X444j2xNblrT3bg2SBeCwRc2iNA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li; spf=pass smtp.mailfrom=drbeat.li; arc=none smtp.client-ip=194.126.200.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=drbeat.li Received: from s019.cyon.net ([149.126.4.28]) by mail-gateway-shared15.cyon.net with esmtpsa (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim) (envelope-from ) id 1rhcJ4-000000002Rp-2Se5 for git@vger.kernel.org; Tue, 05 Mar 2024 22:26:38 +0100 Received: from [10.20.10.233] (port=52108 helo=mail.cyon.ch) by s019.cyon.net with esmtpa (Exim 4.96.2) (envelope-from ) id 1rhcJ3-006Kdy-1Y; Tue, 05 Mar 2024 22:26:37 +0100 Received: from minibeat.bolli (minibeat.bolli [192.168.11.3]) by drbeat.li (Postfix) with SMTP id 2BF6B180036; Tue, 5 Mar 2024 22:26:36 +0100 (CET) Received: by minibeat.bolli (sSMTP sendmail emulation); Tue, 05 Mar 2024 22:26:36 +0100 From: "Beat Bolli" To: git@vger.kernel.org Cc: Junio C Hamano , Beat Bolli Subject: [PATCH 11/22] t/t6*: avoid redundant uses of cat Date: Tue, 5 Mar 2024 22:25:10 +0100 Message-ID: <20240305212533.12947-12-dev+git@drbeat.li> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240305212533.12947-1-dev+git@drbeat.li> References: <20240305212533.12947-1-dev+git@drbeat.li> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s019.cyon.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - drbeat.li X-Get-Message-Sender-Via: s019.cyon.net: authenticated_id: ig@drbeat.li X-Authenticated-Sender: s019.cyon.net: ig@drbeat.li Signed-off-by: Beat Bolli --- t/t6112-rev-list-filters-objects.sh | 2 +- t/t6413-merge-crlf.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/t/t6112-rev-list-filters-objects.sh b/t/t6112-rev-list-filters-objects.sh index 52822b9461a1..43e1afd44c9b 100755 --- a/t/t6112-rev-list-filters-objects.sh +++ b/t/t6112-rev-list-filters-objects.sh @@ -670,7 +670,7 @@ test_expect_success 'rev-list W/ --missing=print' ' awk -f print_2.awk ls_files_result | sort >expected && - for id in `cat expected | sed "s|..|&/|"` + for id in `sed "s|..|&/|" expected` do rm r1/.git/objects/$id || return 1 done && diff --git a/t/t6413-merge-crlf.sh b/t/t6413-merge-crlf.sh index b4f4a313f486..647ea1e83829 100755 --- a/t/t6413-merge-crlf.sh +++ b/t/t6413-merge-crlf.sh @@ -34,14 +34,14 @@ test_expect_success setup ' test_expect_success 'Check "ours" is CRLF' ' git reset --hard initial && git merge side -s ours && - cat file | remove_cr | append_cr >file.temp && + remove_cr file.temp && test_cmp file file.temp ' test_expect_success 'Check that conflict file is CRLF' ' git reset --hard a && test_must_fail git merge side && - cat file | remove_cr | append_cr >file.temp && + remove_cr file.temp && test_cmp file file.temp ' From patchwork Tue Mar 5 21:25:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Beat Bolli X-Patchwork-Id: 13583030 Received: from mail-gateway-shared15.cyon.net (mail-gateway-shared15.cyon.net [194.126.200.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BBDD112D752 for ; Tue, 5 Mar 2024 21:26:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.126.200.68 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709674003; cv=none; b=UrOccLCrQssMwYPkwr4GQxyglxi1+NSF+6gkJBU3AEQQ1eTPNYSq/F0uSjz1/RdwLBodmaIpqNeB9rJqHIDGlaubHFm5rR8VibxrJMh4s7QOD7oq9+gj+Uyo2UCgcpYsNOfC+r4BstpqMFZfaNIN6gQYc1dIbAa821YTvyZjIv8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709674003; c=relaxed/simple; bh=Cz0k7VFrUIr836cBw/gMXsVPyXzyHJYg/Jhb43e0LbU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=A2bUfrY1YrffUhbhLv9dNo+uCvwZoqA54ZkZEDalVLYr8X4CvOQN4AX2Nz/AAJ/t3gUaQtCbL+/I/WH1DVOS2L7KDxiSeugGyNgDcehMZkJFPNG+7DvKoDqrcAfg4tiQmFToy6veMWbyu3HjE2azSV/hQTkDYRFseOfa5ztNP3o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li; spf=pass smtp.mailfrom=drbeat.li; arc=none smtp.client-ip=194.126.200.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=drbeat.li Received: from s019.cyon.net ([149.126.4.28]) by mail-gateway-shared15.cyon.net with esmtpsa (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim) (envelope-from ) id 1rhcJ5-000000002SC-2vn8 for git@vger.kernel.org; Tue, 05 Mar 2024 22:26:40 +0100 Received: from [10.20.10.233] (port=52638 helo=mail.cyon.ch) by s019.cyon.net with esmtpa (Exim 4.96.2) (envelope-from ) id 1rhcJ4-006KeR-1u; Tue, 05 Mar 2024 22:26:38 +0100 Received: from minibeat.bolli (minibeat.bolli [192.168.11.3]) by drbeat.li (Postfix) with SMTP id 4265918012F; Tue, 5 Mar 2024 22:26:37 +0100 (CET) Received: by minibeat.bolli (sSMTP sendmail emulation); Tue, 05 Mar 2024 22:26:37 +0100 From: "Beat Bolli" To: git@vger.kernel.org Cc: Junio C Hamano , Beat Bolli Subject: [PATCH 12/22] t/t7*: avoid redundant use of cat Date: Tue, 5 Mar 2024 22:25:11 +0100 Message-ID: <20240305212533.12947-13-dev+git@drbeat.li> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240305212533.12947-1-dev+git@drbeat.li> References: <20240305212533.12947-1-dev+git@drbeat.li> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s019.cyon.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - drbeat.li X-Get-Message-Sender-Via: s019.cyon.net: authenticated_id: ig@drbeat.li X-Authenticated-Sender: s019.cyon.net: ig@drbeat.li Signed-off-by: Beat Bolli --- t/t7704-repack-cruft.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t7704-repack-cruft.sh b/t/t7704-repack-cruft.sh index be3735dff083..71e1ef3a103e 100755 --- a/t/t7704-repack-cruft.sh +++ b/t/t7704-repack-cruft.sh @@ -48,7 +48,7 @@ test_expect_success '--expire-to stores pruned objects (now)' ' # ...in other words, the combined contents of this # repository and expired.git should be the same as the # set of objects we started with. - cat expired.objects remaining.objects | sort >actual && + sort expired.objects remaining.objects >actual && test_cmp expect actual && # The "moved" objects (i.e., those in expired.git) From patchwork Tue Mar 5 21:25:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Beat Bolli X-Patchwork-Id: 13583031 Received: from mail-gateway-shared15.cyon.net (mail-gateway-shared15.cyon.net [194.126.200.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4730912AAD1 for ; Tue, 5 Mar 2024 21:26:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.126.200.68 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709674004; cv=none; b=YcQROEwM0qMFPFq2hNP23Z5Fqxiq9B/xEHm76uMR3KhOWrPpo//AVK6GN32pbaHrHeV85Xmlt64fN/jKSj/EI59wPM62CPcPwQg1MR5jn9gk2mB28xIMTLnMuV04oqxGHpOB8edep8GnPOcL/1uzEbXO0a8QpoWOTvfAACNM6xY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709674004; c=relaxed/simple; bh=RSvInp4Al1RjKCnYUljvLkIgcE9/RogQHK9lhjNNaOU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pJprzckH84vpnn4FLSmVm1SMDqPwlLDjzMVDjM9JXKELCmE5EAujVcMs6GzzYgz6Kh9QdzjDOCCzo/4Nw1SVYTEtiuOC4yeysIYT+Phw5DjSc8XcPBqQ2BWboBf1E9dYXi7Hrr+dkcru8JMPKtmiG2z356fMHXgeOeIx3BcqH94= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li; spf=pass smtp.mailfrom=drbeat.li; arc=none smtp.client-ip=194.126.200.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=drbeat.li Received: from s019.cyon.net ([149.126.4.28]) by mail-gateway-shared15.cyon.net with esmtpsa (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim) (envelope-from ) id 1rhcJ6-000000002SP-3CAH for git@vger.kernel.org; Tue, 05 Mar 2024 22:26:41 +0100 Received: from [10.20.10.233] (port=53062 helo=mail.cyon.ch) by s019.cyon.net with esmtpa (Exim 4.96.2) (envelope-from ) id 1rhcJ5-006Kev-29; Tue, 05 Mar 2024 22:26:39 +0100 Received: from minibeat.bolli (minibeat.bolli [192.168.11.3]) by drbeat.li (Postfix) with SMTP id 598C3180036; Tue, 5 Mar 2024 22:26:38 +0100 (CET) Received: by minibeat.bolli (sSMTP sendmail emulation); Tue, 05 Mar 2024 22:26:38 +0100 From: "Beat Bolli" To: git@vger.kernel.org Cc: Junio C Hamano , Beat Bolli Subject: [PATCH 13/22] t/t8*: avoid redundant use of cat Date: Tue, 5 Mar 2024 22:25:12 +0100 Message-ID: <20240305212533.12947-14-dev+git@drbeat.li> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240305212533.12947-1-dev+git@drbeat.li> References: <20240305212533.12947-1-dev+git@drbeat.li> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s019.cyon.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - drbeat.li X-Get-Message-Sender-Via: s019.cyon.net: authenticated_id: ig@drbeat.li X-Authenticated-Sender: s019.cyon.net: ig@drbeat.li Signed-off-by: Beat Bolli --- t/t8010-cat-file-filters.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t8010-cat-file-filters.sh b/t/t8010-cat-file-filters.sh index ca04242ca016..eb64b766bdfa 100755 --- a/t/t8010-cat-file-filters.sh +++ b/t/t8010-cat-file-filters.sh @@ -43,7 +43,7 @@ test_expect_success 'cat-file --textconv --path= works' ' sha1=$(git rev-parse -q --verify HEAD:world.txt) && test_config diff.txt.textconv "tr A-Za-z N-ZA-Mn-za-m <" && git cat-file --textconv --path=hello.txt $sha1 >rot13 && - test uryyb = "$(cat rot13 | remove_cr)" + test uryyb = "$(remove_cr complains without --textconv/--filters' ' From patchwork Tue Mar 5 21:25:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Beat Bolli X-Patchwork-Id: 13583033 Received: from mail-gateway-shared15.cyon.net (mail-gateway-shared15.cyon.net [194.126.200.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1447912D778 for ; Tue, 5 Mar 2024 21:26:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.126.200.68 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709674005; cv=none; b=ieKQoF8ZkyDoWosDZVo2BYmp8xqmF6Szmuckc5RVerDTWSkZ92v+k22gfBVOEkRvtF3KcPkG/uqo3aIgKBBU//bvAu5ywCI49XzuFCzRDvvUndKyHN+C0EXIKlt4a1TG2v69uczULxgG1NDyljx3bKeEx6seuR/wChWnLTmJzRM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709674005; c=relaxed/simple; bh=cnew7OjLZRXLoGzQx542dW2W8zwQSofBBxUR1M3a938=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hHGwm1yzqTwqXJy3dOoDzXEVw5IMEqM8ocN+GUzFnVpQ3zqNjq9BZ5iKhQj+XV/r2nw2Y76HdWLuXVN3uAqPcdiF0xsvuHnLzFSpb69ZBr9LgyV9mYaRhIaIBsRMHXEjMm6wxVxa2kOyj6u/XvYavGh9AfxfZXdP1CJw7u9MKgI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li; spf=pass smtp.mailfrom=drbeat.li; arc=none smtp.client-ip=194.126.200.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=drbeat.li Received: from s019.cyon.net ([149.126.4.28]) by mail-gateway-shared15.cyon.net with esmtpsa (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim) (envelope-from ) id 1rhcJ7-000000002Se-3y7D for git@vger.kernel.org; Tue, 05 Mar 2024 22:26:42 +0100 Received: from [10.20.10.230] (port=32798 helo=mail.cyon.ch) by s019.cyon.net with esmtpa (Exim 4.96.2) (envelope-from ) id 1rhcJ6-006KfP-2Y; Tue, 05 Mar 2024 22:26:40 +0100 Received: from minibeat.bolli (minibeat.bolli [192.168.11.3]) by drbeat.li (Postfix) with SMTP id 70E3218012F; Tue, 5 Mar 2024 22:26:39 +0100 (CET) Received: by minibeat.bolli (sSMTP sendmail emulation); Tue, 05 Mar 2024 22:26:39 +0100 From: "Beat Bolli" To: git@vger.kernel.org Cc: Junio C Hamano , Beat Bolli Subject: [PATCH 14/22] t/t9*: avoid redundant uses of cat Date: Tue, 5 Mar 2024 22:25:13 +0100 Message-ID: <20240305212533.12947-15-dev+git@drbeat.li> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240305212533.12947-1-dev+git@drbeat.li> References: <20240305212533.12947-1-dev+git@drbeat.li> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s019.cyon.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - drbeat.li X-Get-Message-Sender-Via: s019.cyon.net: authenticated_id: ig@drbeat.li X-Authenticated-Sender: s019.cyon.net: ig@drbeat.li Signed-off-by: Beat Bolli --- t/t9300-fast-import.sh | 10 +++++----- t/t9350-fast-export.sh | 2 +- t/t9400-git-cvsserver-server.sh | 35 +++++++++++++++------------------ t/t9802-git-p4-filetype.sh | 2 +- t/t9807-git-p4-submit.sh | 2 +- t/t9824-git-p4-git-lfs.sh | 4 ++-- 6 files changed, 26 insertions(+), 29 deletions(-) diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh index dbb5042b0b8f..c03adbdd145f 100755 --- a/t/t9300-fast-import.sh +++ b/t/t9300-fast-import.sh @@ -986,7 +986,7 @@ test_expect_success 'L: nested tree copy does not corrupt deltas' ' test_when_finished "git update-ref -d refs/heads/L2" && git fast-import tmp && - cat tmp | cut -f 2 >actual && + cut -f 2 actual && test_cmp expect actual && git fsck $(git rev-parse L2) ' @@ -2012,7 +2012,7 @@ test_expect_success 'Q: verify first notes tree' ' 100644 blob $commit2 100644 blob $commit3 EOF - cat expect.unsorted | sort >expect && + sort expect.unsorted >expect && git cat-file -p refs/notes/foobar~2^{tree} | sed "s/ [0-9a-f]* / /" >actual && test_cmp expect actual ' @@ -2053,7 +2053,7 @@ test_expect_success 'Q: verify second notes tree' ' 100644 blob $commit2 100644 blob $commit3 EOF - cat expect.unsorted | sort >expect && + sort expect.unsorted >expect && git cat-file -p refs/notes/foobar^^{tree} | sed "s/ [0-9a-f]* / /" >actual && test_cmp expect actual ' @@ -2091,7 +2091,7 @@ test_expect_success 'Q: verify third notes tree' ' cat >expect.unsorted <<-EOF && 100644 blob $commit1 EOF - cat expect.unsorted | sort >expect && + sort expect.unsorted >expect && git cat-file -p refs/notes/foobar2^{tree} | sed "s/ [0-9a-f]* / /" >actual && test_cmp expect actual ' @@ -2118,7 +2118,7 @@ test_expect_success 'Q: verify fourth notes tree' ' cat >expect.unsorted <<-EOF && 100644 blob $commit2 EOF - cat expect.unsorted | sort >expect && + sort expect.unsorted >expect && git cat-file -p refs/notes/foobar^{tree} | sed "s/ [0-9a-f]* / /" >actual && test_cmp expect actual ' diff --git a/t/t9350-fast-export.sh b/t/t9350-fast-export.sh index e9a12c18bbd3..d86d07a79d4f 100755 --- a/t/t9350-fast-export.sh +++ b/t/t9350-fast-export.sh @@ -236,7 +236,7 @@ EOF test_expect_success 'set up faked signed tag' ' - cat signed-tag-import | git fast-import + git fast-import log 2>&1 && + git-cvsserver pserver log 2>&1 && sed -ne \$p log | grep "^I LOVE YOU\$" ' test_expect_success 'pserver authentication failure (non-anonymous user)' ' - if cat request-git | git-cvsserver pserver >log 2>&1 + if git-cvsserver pserver log 2>&1 then false else @@ -132,17 +132,17 @@ test_expect_success 'pserver authentication failure (non-anonymous user)' ' ' test_expect_success 'pserver authentication success (non-anonymous user with password)' ' - cat login-git-ok | git-cvsserver pserver >log 2>&1 && + git-cvsserver pserver log 2>&1 && sed -ne \$p log | grep "^I LOVE YOU\$" ' test_expect_success 'pserver authentication (login)' ' - cat login-anonymous | git-cvsserver pserver >log 2>&1 && + git-cvsserver pserver log 2>&1 && sed -ne \$p log | grep "^I LOVE YOU\$" ' test_expect_success 'pserver authentication failure (login/non-anonymous user)' ' - if cat login-git | git-cvsserver pserver >log 2>&1 + if git-cvsserver pserver log 2>&1 then false else @@ -172,7 +172,7 @@ Root $WORKDIR EOF test_expect_success 'req_Root failure (relative pathname)' ' - if cat request-relative | git-cvsserver pserver >log 2>&1 + if git-cvsserver pserver log 2>&1 then echo unexpected success false @@ -183,28 +183,26 @@ test_expect_success 'req_Root failure (relative pathname)' ' ' test_expect_success 'req_Root failure (conflicting roots)' ' - cat request-conflict | git-cvsserver pserver >log 2>&1 && + git-cvsserver pserver log 2>&1 && tail log | grep "^error 1 Conflicting roots specified$" ' test_expect_success 'req_Root (strict paths)' ' - cat request-anonymous | git-cvsserver --strict-paths pserver "$SERVERDIR" >log 2>&1 && + git-cvsserver --strict-paths pserver "$SERVERDIR" log 2>&1 && sed -ne \$p log | grep "^I LOVE YOU\$" ' test_expect_success 'req_Root failure (strict-paths)' ' - ! cat request-anonymous | - git-cvsserver --strict-paths pserver "$WORKDIR" >log 2>&1 + ! git-cvsserver --strict-paths pserver "$WORKDIR" log 2>&1 ' test_expect_success 'req_Root (w/o strict-paths)' ' - cat request-anonymous | git-cvsserver pserver "$WORKDIR/" >log 2>&1 && + git-cvsserver pserver "$WORKDIR/" log 2>&1 && sed -ne \$p log | grep "^I LOVE YOU\$" ' test_expect_success 'req_Root failure (w/o strict-paths)' ' - ! cat request-anonymous | - git-cvsserver pserver "$WORKDIR/gitcvs" >log 2>&1 + ! git-cvsserver pserver "$WORKDIR/gitcvs" log 2>&1 ' cat >request-base <log 2>&1 && + git-cvsserver --strict-paths --base-path "$WORKDIR/" pserver "$SERVERDIR" log 2>&1 && sed -ne \$p log | grep "^I LOVE YOU\$" ' test_expect_success 'req_Root failure (base-path)' ' - ! cat request-anonymous | - git-cvsserver --strict-paths --base-path "$WORKDIR" pserver "$SERVERDIR" >log 2>&1 + ! git-cvsserver --strict-paths --base-path "$WORKDIR" pserver "$SERVERDIR" log 2>&1 ' GIT_DIR="$SERVERDIR" git config --bool gitcvs.enabled false || exit 1 test_expect_success 'req_Root (export-all)' ' - cat request-anonymous | git-cvsserver --export-all pserver "$WORKDIR" >log 2>&1 && + git-cvsserver --export-all pserver "$WORKDIR" log 2>&1 && sed -ne \$p log | grep "^I LOVE YOU\$" ' test_expect_success 'req_Root failure (export-all w/o directory list)' ' - ! (cat request-anonymous | git-cvsserver --export-all pserver >log 2>&1 || false)' + ! (git-cvsserver --export-all pserver log 2>&1 || false)' test_expect_success 'req_Root (everything together)' ' - cat request-base | git-cvsserver --export-all --strict-paths --base-path "$WORKDIR/" pserver "$SERVERDIR" >log 2>&1 && + git-cvsserver --export-all --strict-paths --base-path "$WORKDIR/" pserver "$SERVERDIR" log 2>&1 && sed -ne \$p log | grep "^I LOVE YOU\$" ' diff --git a/t/t9802-git-p4-filetype.sh b/t/t9802-git-p4-filetype.sh index 2a6ee2a46787..bb236cd2b57a 100755 --- a/t/t9802-git-p4-filetype.sh +++ b/t/t9802-git-p4-filetype.sh @@ -175,7 +175,7 @@ test_expect_success 'keyword file create' ' cp k-text-k k-text-ko && p4 add -t text+ko k-text-ko && - cat k-text-k | iconv -f ascii -t utf-16 >k-utf16-k && + iconv -f ascii -t utf-16 k-utf16-k && p4 add -t utf16+k k-utf16-k && cp k-utf16-k k-utf16-ko && diff --git a/t/t9807-git-p4-submit.sh b/t/t9807-git-p4-submit.sh index af4b286f9d51..6ae7ced51be1 100755 --- a/t/t9807-git-p4-submit.sh +++ b/t/t9807-git-p4-submit.sh @@ -418,7 +418,7 @@ test_expect_success 'description with Jobs and values on separate lines' ' marshal_dump job0 jobs && - cat jobname1 jobname2 | sort >expected && + sort jobname1 jobname2 >expected && test_cmp expected jobs ) ' diff --git a/t/t9824-git-p4-git-lfs.sh b/t/t9824-git-p4-git-lfs.sh index a28dbbdd566c..fd430403d716 100755 --- a/t/t9824-git-p4-git-lfs.sh +++ b/t/t9824-git-p4-git-lfs.sh @@ -17,8 +17,8 @@ test_file_in_lfs () { sed -n '2,2 p' "$FILE" | grep "^oid " && sed -n '3,3 p' "$FILE" | grep "^size " && test_line_count = 3 "$FILE" && - cat "$FILE" | grep "size $SIZE" && - HASH=$(cat "$FILE" | grep "oid sha256:" | sed -e "s/oid sha256://g") && + grep "size $SIZE" "$FILE" && + HASH=$(grep "oid sha256:" "$FILE" | sed -e "s/oid sha256://g") && LFS_FILE=".git/lfs/objects/$(echo "$HASH" | cut -c1-2)/$(echo "$HASH" | cut -c3-4)/$HASH" && echo $EXPECTED_CONTENT >expect && test_path_is_file "$FILE" && From patchwork Tue Mar 5 21:25:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Beat Bolli X-Patchwork-Id: 13583034 Received: from mail-gateway-shared15.cyon.net (mail-gateway-shared15.cyon.net [194.126.200.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 76ACA12DD90 for ; Tue, 5 Mar 2024 21:26:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.126.200.68 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709674007; cv=none; b=XrppzidahvHHVdnT1xH8q+AavwfM36lHWgVTp1sE7GoSQE1VY7C8p+8pQF6H3kSyzypOrQ8GLsTeu1k3bCDM7vvcyxlxxwujw+XapyGVS1qmDFTLiQqzVFWNVmHNdAkLAUfxhUabhIFSPsQOdyLVG36Qw0DEj2Iud9z5LsxVCk0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709674007; c=relaxed/simple; bh=27ALFgTOAWR2LJua3O7BbqlGpiD5jfxgf2P/MpRiJyg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=X+rRkRT26DW8DMsk+MN7Bh0ggdny/jnT4E4CUerJthK3iPz0bZxopuW8/j+QMvS4T5IVWFwOZoHo5vxZWQiYtTZ9Isvpk5fU4HmWkFqKD3SfQ/57qvVIOYhPbadoumZYoFoIW8yZdoKjZZS31NXcM5j5t4/fB2e2gORzuw3DQTw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li; spf=pass smtp.mailfrom=drbeat.li; arc=none smtp.client-ip=194.126.200.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=drbeat.li Received: from s019.cyon.net ([149.126.4.28]) by mail-gateway-shared15.cyon.net with esmtpsa (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim) (envelope-from ) id 1rhcJ8-000000002Sv-41Wi for git@vger.kernel.org; Tue, 05 Mar 2024 22:26:43 +0100 Received: from [10.20.10.232] (port=34836 helo=mail.cyon.ch) by s019.cyon.net with esmtpa (Exim 4.96.2) (envelope-from ) id 1rhcJ7-006Kfw-2j; Tue, 05 Mar 2024 22:26:41 +0100 Received: from minibeat.bolli (minibeat.bolli [192.168.11.3]) by drbeat.li (Postfix) with SMTP id 87DC2180036; Tue, 5 Mar 2024 22:26:40 +0100 (CET) Received: by minibeat.bolli (sSMTP sendmail emulation); Tue, 05 Mar 2024 22:26:40 +0100 From: "Beat Bolli" To: git@vger.kernel.org Cc: Junio C Hamano , Beat Bolli Subject: [PATCH 15/22] t/t1*: merge a "grep | sed" pipeline Date: Tue, 5 Mar 2024 22:25:14 +0100 Message-ID: <20240305212533.12947-16-dev+git@drbeat.li> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240305212533.12947-1-dev+git@drbeat.li> References: <20240305212533.12947-1-dev+git@drbeat.li> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s019.cyon.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - drbeat.li X-Get-Message-Sender-Via: s019.cyon.net: authenticated_id: ig@drbeat.li X-Authenticated-Sender: s019.cyon.net: ig@drbeat.li Signed-off-by: Beat Bolli --- t/t1509/prepare-chroot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t1509/prepare-chroot.sh b/t/t1509/prepare-chroot.sh index 6d47e2c725f7..dc997e0a6437 100755 --- a/t/t1509/prepare-chroot.sh +++ b/t/t1509/prepare-chroot.sh @@ -43,7 +43,7 @@ rsync --exclude-from t/t1509/excludes -Ha . "$R$(pwd)" # env might slip through, see test-lib.sh, unset.*PERL_PATH sed 's|^PERL_PATH=.*|PERL_PATH=/bin/true|' GIT-BUILD-OPTIONS > "$R$(pwd)/GIT-BUILD-OPTIONS" for cmd in git $BB;do - ldd $cmd | grep '/' | sed 's,.*\s\(/[^ ]*\).*,\1,' | while read i; do + ldd $cmd | sed -n '/\//s,.*\s\(/[^ ]*\).*,\1,p' | while read i; do mkdir -p "$R$(dirname $i)" cp "$i" "$R/$i" done From patchwork Tue Mar 5 21:25:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Beat Bolli X-Patchwork-Id: 13583035 Received: from mail-gateway-shared15.cyon.net (mail-gateway-shared15.cyon.net [194.126.200.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 418DE12DDB0 for ; Tue, 5 Mar 2024 21:26:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.126.200.68 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709674007; cv=none; b=CD/cjePoRL/FT5GpDU87vW94hrZxJRNZVcXr2cvLh5ZyXv2LOX1XBz+zpMxPImi4+SRsAHNuVnFSCPDJU7s2zmqaxSAto2UkrB06ba5YvXjhi49jQJwkqteV2WZEJiLL07/H9Go9/5ASrCHU2AeLZUiG9DUgQyw7tYL5xd4OLfk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709674007; c=relaxed/simple; bh=T2rlWkZRvk88WPmyYUMhc6a8x+L+IwxMEMnTVvd4zF4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ho6F+xcDRKlEQmrGXgkGKwxDFNUYRQ/jSs+YM1M0d0Ln0BBrIyh+wf3OwKjyrNvjQUj/g7Fo61MBTWlL7hSf2hb0p05NjZEq/0CvjBd6s1zFkPMUbMzNBjamX05CAo4e2/VgXUPOFCDr8a6zIVdZHEBU//0n+gKM8KTyKHSVTwo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li; spf=pass smtp.mailfrom=drbeat.li; arc=none smtp.client-ip=194.126.200.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=drbeat.li Received: from s019.cyon.net ([149.126.4.28]) by mail-gateway-shared15.cyon.net with esmtpsa (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim) (envelope-from ) id 1rhcJA-000000002Td-0HOf for git@vger.kernel.org; Tue, 05 Mar 2024 22:26:44 +0100 Received: from [10.20.10.232] (port=35456 helo=mail.cyon.ch) by s019.cyon.net with esmtpa (Exim 4.96.2) (envelope-from ) id 1rhcJ8-006KgM-35; Tue, 05 Mar 2024 22:26:42 +0100 Received: from minibeat.bolli (minibeat.bolli [192.168.11.3]) by drbeat.li (Postfix) with SMTP id 9E81218012F; Tue, 5 Mar 2024 22:26:41 +0100 (CET) Received: by minibeat.bolli (sSMTP sendmail emulation); Tue, 05 Mar 2024 22:26:41 +0100 From: "Beat Bolli" To: git@vger.kernel.org Cc: Junio C Hamano , Beat Bolli Subject: [PATCH 16/22] t/t3*: merge a "grep | awk" pipeline Date: Tue, 5 Mar 2024 22:25:15 +0100 Message-ID: <20240305212533.12947-17-dev+git@drbeat.li> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240305212533.12947-1-dev+git@drbeat.li> References: <20240305212533.12947-1-dev+git@drbeat.li> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s019.cyon.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - drbeat.li X-Get-Message-Sender-Via: s019.cyon.net: authenticated_id: ig@drbeat.li X-Authenticated-Sender: s019.cyon.net: ig@drbeat.li Signed-off-by: Beat Bolli --- t/t3920-crlf-messages.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t3920-crlf-messages.sh b/t/t3920-crlf-messages.sh index 5eed640a6825..50ae222f0842 100755 --- a/t/t3920-crlf-messages.sh +++ b/t/t3920-crlf-messages.sh @@ -97,7 +97,7 @@ test_expect_success 'branch: --verbose works with messages using CRLF' ' git branch -v >tmp && # Remove first two columns, and the line for the currently checked out branch current=$(git branch --show-current) && - grep -v $current actual && + awk "/$current/ { next } { \$1 = \$2 = \"\" } 1" actual && test_cmp expect actual ' From patchwork Tue Mar 5 21:25:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Beat Bolli X-Patchwork-Id: 13583036 Received: from mail-gateway-shared15.cyon.net (mail-gateway-shared15.cyon.net [194.126.200.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6334912E1C7 for ; Tue, 5 Mar 2024 21:26:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.126.200.68 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709674009; cv=none; b=FY2tlQqTkDeKQVC9YFpU6HptWAsIiFnuHyPuljpb0fbWkSAmedpJ4GIiF5QBlvWaC5LFyDpEU6qvDYddwcZ7cJZYvm2lqkyDrf9AqQ81clKV8NASEabGv3m1qX1ZfsKKFQaZ/hafOlAVEGhZ6bvK+lS/UxC0GZbYwYmVUI7I3WI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709674009; c=relaxed/simple; bh=W6CSeRMnqWYkGsMI4yWcPedcxD3QaYJoQgAqhvtBrms=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YkOU36bjHUwxg2GorjAB0Zr6KeoFrS5WWPaMrPA/UAfQGjdNZxrs73Fwx0ImKCseCw9vqMmDgmCxIsggRw5Nqy9wQR/aMzUJkQriHqf8E0hD/a19ZVxUtsZWbzlv+tLHjyxxDNk2ZQaBO1tOlLOxhL8tzTgvVtijmXdYb//C1JI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li; spf=pass smtp.mailfrom=drbeat.li; arc=none smtp.client-ip=194.126.200.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=drbeat.li Received: from s019.cyon.net ([149.126.4.28]) by mail-gateway-shared15.cyon.net with esmtpsa (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim) (envelope-from ) id 1rhcJB-000000002Tp-0kY2 for git@vger.kernel.org; Tue, 05 Mar 2024 22:26:45 +0100 Received: from [10.20.10.231] (port=52390 helo=mail.cyon.ch) by s019.cyon.net with esmtpa (Exim 4.96.2) (envelope-from ) id 1rhcJA-006Kgi-0E; Tue, 05 Mar 2024 22:26:44 +0100 Received: from minibeat.bolli (minibeat.bolli [192.168.11.3]) by drbeat.li (Postfix) with SMTP id B554D180036; Tue, 5 Mar 2024 22:26:42 +0100 (CET) Received: by minibeat.bolli (sSMTP sendmail emulation); Tue, 05 Mar 2024 22:26:42 +0100 From: "Beat Bolli" To: git@vger.kernel.org Cc: Junio C Hamano , Beat Bolli Subject: [PATCH 17/22] t/t4*: merge a "grep | sed" pipeline Date: Tue, 5 Mar 2024 22:25:16 +0100 Message-ID: <20240305212533.12947-18-dev+git@drbeat.li> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240305212533.12947-1-dev+git@drbeat.li> References: <20240305212533.12947-1-dev+git@drbeat.li> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s019.cyon.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - drbeat.li X-Get-Message-Sender-Via: s019.cyon.net: authenticated_id: ig@drbeat.li X-Authenticated-Sender: s019.cyon.net: ig@drbeat.li Signed-off-by: Beat Bolli --- t/t4002-diff-basic.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t4002-diff-basic.sh b/t/t4002-diff-basic.sh index 7afc883ec374..cb3307010c1e 100755 --- a/t/t4002-diff-basic.sh +++ b/t/t4002-diff-basic.sh @@ -405,7 +405,7 @@ test_expect_success 'diff-tree -r B A == diff-tree -r -R A B' ' test_expect_success 'diff can read from stdin' ' test_must_fail git diff --no-index -- MN - < NN | - grep -v "^index" | sed "s#/-#/NN#" >.test-a && + sed "/^index/d; s#/-#/NN#" >.test-a && test_must_fail git diff --no-index -- MN NN | grep -v "^index" >.test-b && test_cmp .test-a .test-b From patchwork Tue Mar 5 21:25:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Beat Bolli X-Patchwork-Id: 13583037 Received: from mail-gateway-shared15.cyon.net (mail-gateway-shared15.cyon.net [194.126.200.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A82EB12E1E8 for ; Tue, 5 Mar 2024 21:26:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.126.200.68 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709674010; cv=none; b=URL9DU/FkuA9C09J8IfiMbooWo8fCfaSHN6VZKB31izl0XQqaTfUS5yfD+K7tqUCmffyWr3DanxQyWgLPK1PhcIBtEYsBvx11Vge6O2c+Ho60BkPyvGiarh9XrNZIohfdpO/h4aS2GuvDQgxscYSEO+Jh2eaQWeMLsnsymOjPaQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709674010; c=relaxed/simple; bh=FBGYtMBE46md7xXtSfID/c9wLA56bu8LZllXBqjvfuw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=l6AP3HFwpIEGrLuJ82qa7aiRFJJ3yMNX2M9PN3Qx1IXnhFqMalg8/RUnun1lQhqurXsyjpTMZyX2QP9YJO8tUbRR6S1pWJmPd1aoJLekEG56st8YJJ5Sg1bLepLq+NVZSj66CHddyX89Lg7CNKr411/pqY26atE4O/lspDhvEzQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li; spf=pass smtp.mailfrom=drbeat.li; arc=none smtp.client-ip=194.126.200.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=drbeat.li Received: from s019.cyon.net ([149.126.4.28]) by mail-gateway-shared15.cyon.net with esmtpsa (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim) (envelope-from ) id 1rhcJC-000000002Tz-11u3 for git@vger.kernel.org; Tue, 05 Mar 2024 22:26:46 +0100 Received: from [10.20.10.230] (port=35122 helo=mail.cyon.ch) by s019.cyon.net with esmtpa (Exim 4.96.2) (envelope-from ) id 1rhcJB-006KhG-0R; Tue, 05 Mar 2024 22:26:45 +0100 Received: from minibeat.bolli (minibeat.bolli [192.168.11.3]) by drbeat.li (Postfix) with SMTP id CBA2418012F; Tue, 5 Mar 2024 22:26:43 +0100 (CET) Received: by minibeat.bolli (sSMTP sendmail emulation); Tue, 05 Mar 2024 22:26:43 +0100 From: "Beat Bolli" To: git@vger.kernel.org Cc: Junio C Hamano , Beat Bolli Subject: [PATCH 18/22] t/t5*: merge a "grep | sed" pipeline Date: Tue, 5 Mar 2024 22:25:17 +0100 Message-ID: <20240305212533.12947-19-dev+git@drbeat.li> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240305212533.12947-1-dev+git@drbeat.li> References: <20240305212533.12947-1-dev+git@drbeat.li> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s019.cyon.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - drbeat.li X-Get-Message-Sender-Via: s019.cyon.net: authenticated_id: ig@drbeat.li X-Authenticated-Sender: s019.cyon.net: ig@drbeat.li Signed-off-by: Beat Bolli --- t/t5401-update-hooks.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t5401-update-hooks.sh b/t/t5401-update-hooks.sh index 8b8bc47dc0b9..d8cadeec7331 100755 --- a/t/t5401-update-hooks.sh +++ b/t/t5401-update-hooks.sh @@ -123,7 +123,7 @@ remote: STDOUT post-update remote: STDERR post-update EOF test_expect_success 'send-pack stderr contains hook messages' ' - grep ^remote: send.err | sed "s/ *\$//" >actual && + sed -n "/^remote:/s/ *\$//p" send.err >actual && test_cmp expect actual ' From patchwork Tue Mar 5 21:25:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Beat Bolli X-Patchwork-Id: 13583038 Received: from mail-gateway-shared15.cyon.net (mail-gateway-shared15.cyon.net [194.126.200.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B242C12E1EC for ; Tue, 5 Mar 2024 21:26:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.126.200.68 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709674011; cv=none; b=OQP59UKtdqwz9qn90TnneScsDih3nZeDX33Jr2uQ5XkuOm5DMQ/JtZiwjcO6rQzYZtCzGLKhujZqNK7W9nfDyCg/cmzAC5VkznIEmO5ROANEa55uFsZkvjGtLjdkacG0ZnwWgYV6GWbNFyXAhNPoLex0m0YxlQxsRcxpX7hiFOY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709674011; c=relaxed/simple; bh=RaiJBvfdwM0IBON5om0eZMvZqyxRk7w1In78tX1qsHk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=u6/yHNd/nkk3mCrednGAFUR7tqS4C7hBnEAV/HUGHR6i1CCChpRI1TzNtkvOwWLw0R+Gk2s/mwAJ8DRpPrzYqk0wzfWu0SaEytMPs7udEu3C5pl9Zdjr4K1WmwjvuvIxGol96XPgLqtuEPTM0LCBEGS87aAQJ3SPtvGXfSnn3JU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li; spf=pass smtp.mailfrom=drbeat.li; arc=none smtp.client-ip=194.126.200.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=drbeat.li Received: from s019.cyon.net ([149.126.4.28]) by mail-gateway-shared15.cyon.net with esmtpsa (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim) (envelope-from ) id 1rhcJD-000000002UH-1J5A for git@vger.kernel.org; Tue, 05 Mar 2024 22:26:47 +0100 Received: from [10.20.10.233] (port=56146 helo=mail.cyon.ch) by s019.cyon.net with esmtpa (Exim 4.96.2) (envelope-from ) id 1rhcJC-006Khn-0e; Tue, 05 Mar 2024 22:26:46 +0100 Received: from minibeat.bolli (minibeat.bolli [192.168.11.3]) by drbeat.li (Postfix) with SMTP id DDE82180036; Tue, 5 Mar 2024 22:26:44 +0100 (CET) Received: by minibeat.bolli (sSMTP sendmail emulation); Tue, 05 Mar 2024 22:26:44 +0100 From: "Beat Bolli" To: git@vger.kernel.org Cc: Junio C Hamano , Beat Bolli Subject: [PATCH 19/22] t/t8*: merge "grep | sed" pipelines Date: Tue, 5 Mar 2024 22:25:18 +0100 Message-ID: <20240305212533.12947-20-dev+git@drbeat.li> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240305212533.12947-1-dev+git@drbeat.li> References: <20240305212533.12947-1-dev+git@drbeat.li> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s019.cyon.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - drbeat.li X-Get-Message-Sender-Via: s019.cyon.net: authenticated_id: ig@drbeat.li X-Authenticated-Sender: s019.cyon.net: ig@drbeat.li Signed-off-by: Beat Bolli --- t/t8013-blame-ignore-revs.sh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/t/t8013-blame-ignore-revs.sh b/t/t8013-blame-ignore-revs.sh index 9a03b0f361ff..05213d13f30f 100755 --- a/t/t8013-blame-ignore-revs.sh +++ b/t/t8013-blame-ignore-revs.sh @@ -25,11 +25,11 @@ test_expect_success setup ' git blame --line-porcelain file >blame_raw && - grep -E "^[0-9a-f]+ [0-9]+ 1" blame_raw | sed -e "s/ .*//" >actual && + sed -Ene "/^[0-9a-f]+ [0-9]+ 1/s/ .*//p" blame_raw >actual && git rev-parse X >expect && test_cmp expect actual && - grep -E "^[0-9a-f]+ [0-9]+ 2" blame_raw | sed -e "s/ .*//" >actual && + sed -Ene "/^[0-9a-f]+ [0-9]+ 2/s/ .*//p" blame_raw >actual && git rev-parse X >expect && test_cmp expect actual ' @@ -53,11 +53,11 @@ do test_expect_success "ignore_rev_changing_lines ($I)" ' git blame --line-porcelain --ignore-rev $I file >blame_raw && - grep -E "^[0-9a-f]+ [0-9]+ 1" blame_raw | sed -e "s/ .*//" >actual && + sed -Ene "/^[0-9a-f]+ [0-9]+ 1/s/ .*//p" blame_raw >actual && git rev-parse A >expect && test_cmp expect actual && - grep -E "^[0-9a-f]+ [0-9]+ 2" blame_raw | sed -e "s/ .*//" >actual && + sed -Ene "/^[0-9a-f]+ [0-9]+ 2/s/ .*//p" blame_raw >actual && git rev-parse B >expect && test_cmp expect actual ' @@ -79,10 +79,10 @@ test_expect_success ignore_rev_adding_unblamable_lines ' git rev-parse Y >expect && git blame --line-porcelain file --ignore-rev Y >blame_raw && - grep -E "^[0-9a-f]+ [0-9]+ 3" blame_raw | sed -e "s/ .*//" >actual && + sed -Ene "/^[0-9a-f]+ [0-9]+ 3/s/ .*//p" blame_raw >actual && test_cmp expect actual && - grep -E "^[0-9a-f]+ [0-9]+ 4" blame_raw | sed -e "s/ .*//" >actual && + sed -Ene "/^[0-9a-f]+ [0-9]+ 4/s/ .*//p" blame_raw >actual && test_cmp expect actual ' @@ -92,11 +92,11 @@ test_expect_success ignore_revs_from_files ' git rev-parse Y >ignore_y && git blame --line-porcelain file --ignore-revs-file ignore_x --ignore-revs-file ignore_y >blame_raw && - grep -E "^[0-9a-f]+ [0-9]+ 1" blame_raw | sed -e "s/ .*//" >actual && + sed -Ene "/^[0-9a-f]+ [0-9]+ 1/s/ .*//p" blame_raw >actual && git rev-parse A >expect && test_cmp expect actual && - grep -E "^[0-9a-f]+ [0-9]+ 2" blame_raw | sed -e "s/ .*//" >actual && + sed -Ene "/^[0-9a-f]+ [0-9]+ 2/s/ .*//p" blame_raw >actual && git rev-parse B >expect && test_cmp expect actual ' @@ -106,11 +106,11 @@ test_expect_success ignore_revs_from_configs_and_files ' git config --add blame.ignoreRevsFile ignore_x && git blame --line-porcelain file --ignore-revs-file ignore_y >blame_raw && - grep -E "^[0-9a-f]+ [0-9]+ 1" blame_raw | sed -e "s/ .*//" >actual && + sed -Ene "/^[0-9a-f]+ [0-9]+ 1/s/ .*//p" blame_raw >actual && git rev-parse A >expect && test_cmp expect actual && - grep -E "^[0-9a-f]+ [0-9]+ 2" blame_raw | sed -e "s/ .*//" >actual && + sed -Ene "/^[0-9a-f]+ [0-9]+ 2/s/ .*//p" blame_raw >actual && git rev-parse B >expect && test_cmp expect actual ' @@ -121,10 +121,10 @@ test_expect_success override_ignore_revs_file ' git blame --line-porcelain file --ignore-revs-file "" --ignore-revs-file ignore_y >blame_raw && git rev-parse X >expect && - grep -E "^[0-9a-f]+ [0-9]+ 1" blame_raw | sed -e "s/ .*//" >actual && + sed -Ene "/^[0-9a-f]+ [0-9]+ 1/s/ .*//p" blame_raw >actual && test_cmp expect actual && - grep -E "^[0-9a-f]+ [0-9]+ 2" blame_raw | sed -e "s/ .*//" >actual && + sed -Ene "/^[0-9a-f]+ [0-9]+ 2/s/ .*//p" blame_raw >actual && test_cmp expect actual ' test_expect_success bad_files_and_revs ' @@ -279,11 +279,11 @@ test_expect_success ignore_merge ' test_merge M B && git blame --line-porcelain file --ignore-rev M >blame_raw && - grep -E "^[0-9a-f]+ [0-9]+ 1" blame_raw | sed -e "s/ .*//" >actual && + sed -Ene "/^[0-9a-f]+ [0-9]+ 1/s/ .*//p" blame_raw >actual && git rev-parse B >expect && test_cmp expect actual && - grep -E "^[0-9a-f]+ [0-9]+ 9" blame_raw | sed -e "s/ .*//" >actual && + sed -Ene "/^[0-9a-f]+ [0-9]+ 9/s/ .*//p" blame_raw >actual && git rev-parse C >expect && test_cmp expect actual ' From patchwork Tue Mar 5 21:25:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Beat Bolli X-Patchwork-Id: 13583039 Received: from mail-gateway-shared15.cyon.net (mail-gateway-shared15.cyon.net [194.126.200.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B83F912EBC6 for ; Tue, 5 Mar 2024 21:26:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.126.200.68 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709674012; cv=none; b=AahSttjpO/8ouXTDvxczyHjZiqNVfhggFJqMqZC7ehnA+k06zBjZfRwwAxAdx6Y18A4+Hej7FKbApiBMJXRSxKHbtwpchLgA7rV8czlDXMSr/wyJyJ2J3UAWEbLfq9qQj/bHWzrsPh+FfvO58cKHoQRzg6OOBrfZJNA3yQu3rdU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709674012; c=relaxed/simple; bh=Ka5Cjs70+6pU9eIPGJj+hJfBDJq6YqNeVh3vxWfJhYo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qXNSk+II7Hles5nBnFbFlAE6Gx4jD1kMQEq0CrBpaQRz2I54kZREvGH6777oxfofWri/nznH65ejMQ0BoRzZ+F6VdavNpJ4I+ho+JuCxx7itIXlqQVi+wtWage2ezRhadP0wGex1ndMUdl2p0wsC91xdTkVB3faqpqtEB6/eNLI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li; spf=pass smtp.mailfrom=drbeat.li; arc=none smtp.client-ip=194.126.200.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=drbeat.li Received: from s019.cyon.net ([149.126.4.28]) by mail-gateway-shared15.cyon.net with esmtpsa (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim) (envelope-from ) id 1rhcJE-000000002UW-1rAz for git@vger.kernel.org; Tue, 05 Mar 2024 22:26:48 +0100 Received: from [10.20.10.230] (port=36162 helo=mail.cyon.ch) by s019.cyon.net with esmtpa (Exim 4.96.2) (envelope-from ) id 1rhcJD-006Kie-15; Tue, 05 Mar 2024 22:26:47 +0100 Received: from minibeat.bolli (minibeat.bolli [192.168.11.3]) by drbeat.li (Postfix) with SMTP id 0101B18012F; Tue, 5 Mar 2024 22:26:45 +0100 (CET) Received: by minibeat.bolli (sSMTP sendmail emulation); Tue, 05 Mar 2024 22:26:45 +0100 From: "Beat Bolli" To: git@vger.kernel.org Cc: Junio C Hamano , Beat Bolli Subject: [PATCH 20/22] t/t9*: merge "grep | sed" pipelines Date: Tue, 5 Mar 2024 22:25:19 +0100 Message-ID: <20240305212533.12947-21-dev+git@drbeat.li> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240305212533.12947-1-dev+git@drbeat.li> References: <20240305212533.12947-1-dev+git@drbeat.li> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s019.cyon.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - drbeat.li X-Get-Message-Sender-Via: s019.cyon.net: authenticated_id: ig@drbeat.li X-Authenticated-Sender: s019.cyon.net: ig@drbeat.li Signed-off-by: Beat Bolli --- t/t9118-git-svn-funky-branch-names.sh | 2 +- t/t9350-fast-export.sh | 2 +- t/t9824-git-p4-git-lfs.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/t/t9118-git-svn-funky-branch-names.sh b/t/t9118-git-svn-funky-branch-names.sh index a159ff96b718..d3261e35b818 100755 --- a/t/t9118-git-svn-funky-branch-names.sh +++ b/t/t9118-git-svn-funky-branch-names.sh @@ -38,7 +38,7 @@ test_expect_success 'setup svnrepo' ' # SVN 1.7 will truncate "not-a%40{0]" to just "not-a". # Look at what SVN wound up naming the branch and use that. # Be sure to escape the @ if it shows up. -non_reflog=$(svn_cmd ls "$svnrepo/pr ject/branches" | grep not-a | sed 's/\///' | sed 's/@/%40/') +non_reflog=$(svn_cmd ls "$svnrepo/pr ject/branches" | sed -ne '/not-a/ { s/\///; s/@/%40/; p }') test_expect_success 'test clone with funky branch names' ' git svn clone -s "$svnrepo/pr ject" project && diff --git a/t/t9350-fast-export.sh b/t/t9350-fast-export.sh index d86d07a79d4f..1eb035ee4ce5 100755 --- a/t/t9350-fast-export.sh +++ b/t/t9350-fast-export.sh @@ -537,7 +537,7 @@ test_expect_success 'full-tree re-shows unmodified files' ' test_expect_success 'set-up a few more tags for tag export tests' ' git checkout -f main && - HEAD_TREE=$(git show -s --pretty=raw HEAD | grep tree | sed "s/tree //") && + HEAD_TREE=$(git show -s --pretty=raw HEAD | sed -n "/tree/s/tree //p") && git tag tree_tag -m "tagging a tree" $HEAD_TREE && git tag -a tree_tag-obj -m "tagging a tree" $HEAD_TREE && git tag tag-obj_tag -m "tagging a tag" tree_tag-obj && diff --git a/t/t9824-git-p4-git-lfs.sh b/t/t9824-git-p4-git-lfs.sh index fd430403d716..80c8c31e320f 100755 --- a/t/t9824-git-p4-git-lfs.sh +++ b/t/t9824-git-p4-git-lfs.sh @@ -18,7 +18,7 @@ test_file_in_lfs () { sed -n '3,3 p' "$FILE" | grep "^size " && test_line_count = 3 "$FILE" && grep "size $SIZE" "$FILE" && - HASH=$(grep "oid sha256:" "$FILE" | sed -e "s/oid sha256://g") && + HASH=$(sed -ne "/oid sha256:/s/oid sha256://gp" "$FILE") && LFS_FILE=".git/lfs/objects/$(echo "$HASH" | cut -c1-2)/$(echo "$HASH" | cut -c3-4)/$HASH" && echo $EXPECTED_CONTENT >expect && test_path_is_file "$FILE" && From patchwork Tue Mar 5 21:25:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Beat Bolli X-Patchwork-Id: 13583040 Received: from mail-gateway-shared15.cyon.net (mail-gateway-shared15.cyon.net [194.126.200.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 05AA212CD9A for ; Tue, 5 Mar 2024 21:26:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.126.200.68 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709674013; cv=none; b=cCuud0sL1EhnYsJVepjujEFSKpfVTP6WeoxJ2QjCMmmi15SdfyGtWYeIl2UU0dFH2CLi8K23vZuvVSdljA+GqWSZD3ov5rJvBKf8M5Nu0AxCIxwgoUAd4exgzD/+uMp6jKSzeCAp2nODWVL4eMnBAUMZl1J4KYbFzti6KYPYwx4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709674013; c=relaxed/simple; bh=hVe7QVNkf4DGFvFdB40IbSu04RV35tP0eR3k3Wkx0aI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nSqRcYcdXh+qM8ssIny/CeqnGxT6xVIXyYILeWbYuGNT8Cp42nzfqF2zTdpZykVFVZXOkIViKnt+55hc3dsSfKrvI7NLJWwsMjV8haKqQYyYbUU/fElarO0XesSsBQR2v7f0u9o0V9oOmTK9RFuLwwEXvFnKtuksba4o2a5Bz+0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li; spf=pass smtp.mailfrom=drbeat.li; arc=none smtp.client-ip=194.126.200.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=drbeat.li Received: from s019.cyon.net ([149.126.4.28]) by mail-gateway-shared15.cyon.net with esmtpsa (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim) (envelope-from ) id 1rhcJF-000000002Up-20tD for git@vger.kernel.org; Tue, 05 Mar 2024 22:26:50 +0100 Received: from [10.20.10.233] (port=57810 helo=mail.cyon.ch) by s019.cyon.net with esmtpa (Exim 4.96.2) (envelope-from ) id 1rhcJE-006Kjg-1B; Tue, 05 Mar 2024 22:26:48 +0100 Received: from minibeat.bolli (minibeat.bolli [192.168.11.3]) by drbeat.li (Postfix) with SMTP id 16351180036; Tue, 5 Mar 2024 22:26:47 +0100 (CET) Received: by minibeat.bolli (sSMTP sendmail emulation); Tue, 05 Mar 2024 22:26:47 +0100 From: "Beat Bolli" To: git@vger.kernel.org Cc: Junio C Hamano , Beat Bolli Subject: [PATCH 21/22] contrib/coverage-diff: avoid redundant pipelines Date: Tue, 5 Mar 2024 22:25:20 +0100 Message-ID: <20240305212533.12947-22-dev+git@drbeat.li> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240305212533.12947-1-dev+git@drbeat.li> References: <20240305212533.12947-1-dev+git@drbeat.li> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s019.cyon.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - drbeat.li X-Get-Message-Sender-Via: s019.cyon.net: authenticated_id: ig@drbeat.li X-Authenticated-Sender: s019.cyon.net: ig@drbeat.li Merge multiple sed and "grep | awk" invocations, finally use "sort -u" instead of "sort | uniq". Signed-off-by: Beat Bolli --- contrib/coverage-diff.sh | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/contrib/coverage-diff.sh b/contrib/coverage-diff.sh index 4ec419f90048..6ce9603568ef 100755 --- a/contrib/coverage-diff.sh +++ b/contrib/coverage-diff.sh @@ -74,8 +74,7 @@ do sort >uncovered_lines.txt comm -12 uncovered_lines.txt new_lines.txt | - sed -e 's/$/\)/' | - sed -e 's/^/ /' >uncovered_new_lines.txt + sed -e 's/$/\)/' -e 's/^/ /' >uncovered_new_lines.txt grep -q '[^[:space:]]' >coverage-data.txt && @@ -91,11 +90,7 @@ cat coverage-data.txt echo "Commits introducing uncovered code:" -commit_list=$(cat coverage-data.txt | - grep -E '^[0-9a-f]{7,} ' | - awk '{print $1;}' | - sort | - uniq) +commit_list=$(awk '/^[0-9a-f]{7,}/ { print $1 }' coverage-data.txt | sort -u) ( for commit in $commit_list From patchwork Tue Mar 5 21:25:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Beat Bolli X-Patchwork-Id: 13583041 Received: from mail-gateway-shared15.cyon.net (mail-gateway-shared15.cyon.net [194.126.200.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ADBBF12F594 for ; Tue, 5 Mar 2024 21:26:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.126.200.68 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709674014; cv=none; b=JVQzMNgSDJJ0z4Au5EL6FHZjAVf1n0cMWSVV2T8LcB1/d8D+HqpB/EVTeYhv7ccD+morkvqHKoDFJeHqWgiaRdqDxmsBli5nyhxDXZpRYDxKJH7nyeHat5JWYZMr9FV1v0AE01PrG9Sa6QDV0y7Tql6LipFudUIKsnG/Pnnj9v0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709674014; c=relaxed/simple; bh=dNPRDkkM4IUwytFXl8H1utciOM4OELyXwXUoSQgllzA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VgtoXw0P3YIqwEaFELgsctYL49v74OdVTlqKejbYHWNwE0fjKVMmRqAGx8KiK6auPVE6EpW7ggz+sJ2+jKjtCaaj/924BJ8D1rUzfMZ42gi73hzPbxJTfMexuhF7nFGX23Z//ZH6iLkhnYwBXEWWPe4/15blrEIDT/OE84mkUp4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li; spf=pass smtp.mailfrom=drbeat.li; arc=none smtp.client-ip=194.126.200.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=drbeat.li Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=drbeat.li Received: from s019.cyon.net ([149.126.4.28]) by mail-gateway-shared15.cyon.net with esmtpsa (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim) (envelope-from ) id 1rhcJG-000000002V1-2Ovi for git@vger.kernel.org; Tue, 05 Mar 2024 22:26:51 +0100 Received: from [10.20.10.230] (port=37856 helo=mail.cyon.ch) by s019.cyon.net with esmtpa (Exim 4.96.2) (envelope-from ) id 1rhcJF-006Kjy-1V; Tue, 05 Mar 2024 22:26:49 +0100 Received: from minibeat.bolli (minibeat.bolli [192.168.11.3]) by drbeat.li (Postfix) with SMTP id 2AE6118012F; Tue, 5 Mar 2024 22:26:48 +0100 (CET) Received: by minibeat.bolli (sSMTP sendmail emulation); Tue, 05 Mar 2024 22:26:48 +0100 From: "Beat Bolli" To: git@vger.kernel.org Cc: Junio C Hamano , Beat Bolli Subject: [PATCH 22/22] git-quiltimport: avoid an unnecessary subshell Date: Tue, 5 Mar 2024 22:25:21 +0100 Message-ID: <20240305212533.12947-23-dev+git@drbeat.li> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240305212533.12947-1-dev+git@drbeat.li> References: <20240305212533.12947-1-dev+git@drbeat.li> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s019.cyon.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - drbeat.li X-Get-Message-Sender-Via: s019.cyon.net: authenticated_id: ig@drbeat.li X-Authenticated-Sender: s019.cyon.net: ig@drbeat.li Use braces for the compound command. Signed-off-by: Beat Bolli --- git-quiltimport.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-quiltimport.sh b/git-quiltimport.sh index e3d390974331..eb34cda4092a 100755 --- a/git-quiltimport.sh +++ b/git-quiltimport.sh @@ -148,7 +148,7 @@ do if [ -z "$dry_run" ] ; then git apply --index -C1 ${level:+"$level"} "$tmp_patch" && tree=$(git write-tree) && - commit=$( (echo "$SUBJECT"; echo; cat "$tmp_msg") | git commit-tree $tree -p $commit) && + commit=$( { echo "$SUBJECT"; echo; cat "$tmp_msg"; } | git commit-tree $tree -p $commit) && git update-ref -m "quiltimport: $patch_name" HEAD $commit || exit 4 fi done 3<"$QUILT_SERIES"