From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.4 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 832BA1F47C for ; Mon, 16 Jan 2023 09:45:17 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; unprotected) header.d=cs.ucla.edu header.i=@cs.ucla.edu header.a=rsa-sha256 header.s=78364E5A-2AF3-11ED-87FA-8298ECA2D365 header.b=Mrs/iu8C; dkim-atps=neutral Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pHM2x-0001ai-Dc; Mon, 16 Jan 2023 04:44:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHM2u-0001aA-2X for bug-gnulib@gnu.org; Mon, 16 Jan 2023 04:44:53 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHM2s-00079W-5l for bug-gnulib@gnu.org; Mon, 16 Jan 2023 04:44:51 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id D31B2160045 for ; Mon, 16 Jan 2023 01:44:46 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 3F3CDvomHdiq; Mon, 16 Jan 2023 01:44:46 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id DCF2A160044; Mon, 16 Jan 2023 01:44:45 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.9.2 zimbra.cs.ucla.edu DCF2A160044 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=78364E5A-2AF3-11ED-87FA-8298ECA2D365; t=1673862285; bh=hS96EM5yK527lh/oXgs3MemQ7+PSqnXXSLUmpgsyFqQ=; h=From:To:Subject:Date:Message-Id:MIME-Version:Content-Type: Content-Transfer-Encoding; b=Mrs/iu8CQUjETICVVxfrxrBaHJy6+c6Bae247sjv4q/cL/mmufMuIFYW1pj4Zoe/w Ag0Aof7FAZBoBQ7dP3ZYLKFHI31wW4oAGvSQfTztUz3Mvyx/P0vX/hOoLU8tkbBr8b TsVzvYAu7TOeYcpy1v2RrP5n+Cc2JR4LLnsVVD9Y= X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id h-tBxqTQtFWB; Mon, 16 Jan 2023 01:44:45 -0800 (PST) Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id A8AE8160041; Mon, 16 Jan 2023 01:44:45 -0800 (PST) From: Paul Eggert To: bug-gnulib@gnu.org Cc: Paul Eggert Subject: [PATCH] =?UTF-8?q?Use=20=E2=80=98head=20-n1=E2=80=99=20rather=20t?= =?UTF-8?q?han=20=E2=80=98head=20-1=E2=80=99?= Date: Mon, 16 Jan 2023 01:44:39 -0800 Message-Id: <20230116094439.346353-1-eggert@cs.ucla.edu> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=131.179.128.68; envelope-from=eggert@cs.ucla.edu; helo=zimbra.cs.ucla.edu X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org POSIX no longer requires support for =E2=80=98head -1=E2=80=99. --- lib/git-merge-changelog.c | 4 ++-- tests/test-sigpipe.c | 2 +- tests/test-sigpipe.sh | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/git-merge-changelog.c b/lib/git-merge-changelog.c index 679c4aac1a..5708dd5eac 100644 --- a/lib/git-merge-changelog.c +++ b/lib/git-merge-changelog.c @@ -1161,9 +1161,9 @@ There is NO WARRANTY, to the extent permitted by la= w.\n\ { char buf[1000]; printf ("First line of %%A:\n"); - sprintf (buf, "head -1 %s", destination_file_name); system (buf); + sprintf (buf, "head -n 1 %s", destination_file_name); system (buf)= ; printf ("First line of %%B:\n"); - sprintf (buf, "head -1 %s", other_file_name); system (buf); + sprintf (buf, "head -n 1 %s", other_file_name); system (buf); printf ("Guessing calling convention: %s\n", downstream ? "%A =3D modified by user, %B =3D upstream" diff --git a/tests/test-sigpipe.c b/tests/test-sigpipe.c index 8a02f0c048..ab8745b3bd 100644 --- a/tests/test-sigpipe.c +++ b/tests/test-sigpipe.c @@ -46,7 +46,7 @@ main (int argc, char **argv) case 'C': signal (SIGPIPE, handler); break; } =20 - /* Produce infinite output. Since it is piped into "head -1", the wri= tes + /* Produce infinite output. Since it is piped into "head -n 1", the w= rites must ultimately fail. */ for (;;) { diff --git a/tests/test-sigpipe.sh b/tests/test-sigpipe.sh index 5c87f6ed50..a304febf97 100755 --- a/tests/test-sigpipe.sh +++ b/tests/test-sigpipe.sh @@ -5,7 +5,7 @@ trap 'rm -fr $tmpfiles' HUP INT QUIT TERM =20 # Test signal's default behaviour. tmpfiles=3D"$tmpfiles t-sigpipeA.tmp" -${CHECKER} ./test-sigpipe${EXEEXT} A 2> t-sigpipeA.tmp | head -1 > /dev/= null +${CHECKER} ./test-sigpipe${EXEEXT} A 2> t-sigpipeA.tmp | head -n 1 > /de= v/null if test -s t-sigpipeA.tmp; then LC_ALL=3DC tr -d '\r' < t-sigpipeA.tmp rm -fr $tmpfiles; exit 1 @@ -13,7 +13,7 @@ fi =20 # Test signal's ignored behaviour. tmpfiles=3D"$tmpfiles t-sigpipeB.tmp" -${CHECKER} ./test-sigpipe${EXEEXT} B 2> t-sigpipeB.tmp | head -1 > /dev/= null +${CHECKER} ./test-sigpipe${EXEEXT} B 2> t-sigpipeB.tmp | head -n 1 > /de= v/null if test -s t-sigpipeB.tmp; then LC_ALL=3DC tr -d '\r' < t-sigpipeB.tmp rm -fr $tmpfiles; exit 1 @@ -21,7 +21,7 @@ fi =20 # Test signal's behaviour when a handler is installed. tmpfiles=3D"$tmpfiles t-sigpipeC.tmp" -${CHECKER} ./test-sigpipe${EXEEXT} C 2> t-sigpipeC.tmp | head -1 > /dev/= null +${CHECKER} ./test-sigpipe${EXEEXT} C 2> t-sigpipeC.tmp | head -n 1 > /de= v/null if test -s t-sigpipeC.tmp; then LC_ALL=3DC tr -d '\r' < t-sigpipeC.tmp rm -fr $tmpfiles; exit 1 --=20 2.39.0