From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id 17A3C1F61A for ; Mon, 12 Dec 2022 13:30:13 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; secure) header.d=web.de header.i=@web.de header.b="SfCQp50T"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232131AbiLLN3s (ORCPT ); Mon, 12 Dec 2022 08:29:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232286AbiLLN3q (ORCPT ); Mon, 12 Dec 2022 08:29:46 -0500 Received: from mout.web.de (mout.web.de [212.227.17.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 057D9B21 for ; Mon, 12 Dec 2022 05:29:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1670851782; bh=3Jc8wCyVfSrqfBRDWTnKVeK7CiLDpxyllUpvPd0YHqQ=; h=X-UI-Sender-Class:Date:Subject:To:References:Cc:From:In-Reply-To; b=SfCQp50T03lSDJiV8wtwWR9GOQ6rg2toFG4xKEL+/RiwO5sHeSX85Rmv7ocV7YcxB QQ2gp3j9XKqT6aivdIXg4Sr0HutDy89Sopp1jyNGwy9KHky3oiIX9qtSDAJi7DKK/p /sl9HZtDww9I4C+BQoE9U7NJfoT+pFRALA1kZC0zwd7c8OXWC62JRkbqxK5UQ+MUxD jhGck/CxnknP7c2w7UVazkxSp3rh0Am0Gf3U/LVYf7D/vGtXGz5x94/Oow7SAMGNql wxgj32Y9p1+rSrU6E9GYY5YVBcmfxGDIYxTnynmuTsnuAuWEmZo2ftYXUBcLP0oA3V jSxl1C/m1SATw== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.178.29] ([91.47.151.35]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MKuKF-1pNCfL0nZF-00L53K; Mon, 12 Dec 2022 14:29:42 +0100 Message-ID: <30f80aa4-d5c1-4fce-f1c9-710eabeaa022@web.de> Date: Mon, 12 Dec 2022 14:29:41 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: Issue with git > 2.36.1 and pre-commit hook on macOS M1 To: Piotrek References: <51d5993f-a1e0-519e-ffa9-ec5205c5e96d@o2.pl> Content-Language: en-US Cc: =?UTF-8?B?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= , git@vger.kernel.org From: =?UTF-8?Q?Ren=c3=a9_Scharfe?= In-Reply-To: <51d5993f-a1e0-519e-ffa9-ec5205c5e96d@o2.pl> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:TmxhXcGFVKeWubZmQ6gyw5qeqELmc5NKW3EZfAAY2GcKuh7jWq5 W6vlFwpfJQSJ7kuOki0pN7fgRSzt+Ii6IbWZwRIboA80ZF8nGfE7WtAIuLLksXT3ANtlLKW hCbGhv+pOZXsxm3KCp3YpxGqjk5lTieBM4nBnjo/QNmcUBbDK07EdzPtbBcAcfNf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: bulk List-ID: X-Mailing-List: git@vger.kernel.org Am 11.12.22 um 22:11 schrieb Piotrek: > Hello. > > On MacOS 12.6.1 with M1 chip, git >=3D2.37.0 (installed by homebrew) > and pre-commit hook that is calling *make* target, that is calling > *docker compose run* command, we get error: > > the input device is not a TTY > > All works file with homebrew git version 2.36.1 Bisects to a082345372 (hook API: fix v2.36.0 regression: hooks should be connected to a TTY, 2022-06-07). Adding "for fd in 0 1 2; do test -t $fd; printf %d $?; done; echo" to the shell script .git/hook/pre-commit yields 100 since a082345372, i.e. fd 1 (stdout) and fd 2 (stderr) are associated with a terminal, while fd 0 (stdin) is not. Before we got 111, i.e. none of the standard file descriptors were associated with a terminal. v2.37.0 includes a082345372. v2.35.0 gives 100 as well, as expected, so older versions of Git should have "docker compose" complain as well. While "docker compose" is right in that stdin is not a TTY, it never was. Redirecting the output its seems to help. So I guess it checks if stdout is connected to a terminal and then expects stdin to be a TTY as well. Try appending " | cat" to the command in the pre-commit hook, which breaks the connection for stdout. Ren=C3=A9