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: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 3234E1F5AE for ; Tue, 11 May 2021 06:10:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230139AbhEKGLe (ORCPT ); Tue, 11 May 2021 02:11:34 -0400 Received: from cloud.peff.net ([104.130.231.41]:50168 "EHLO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229840AbhEKGLe (ORCPT ); Tue, 11 May 2021 02:11:34 -0400 Received: (qmail 21167 invoked by uid 109); 11 May 2021 06:10:28 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Tue, 11 May 2021 06:10:28 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 20545 invoked by uid 111); 11 May 2021 06:10:29 -0000 Received: from coredump.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Tue, 11 May 2021 02:10:29 -0400 Authentication-Results: peff.net; auth=none Date: Tue, 11 May 2021 02:10:27 -0400 From: Jeff King To: Junio C Hamano Cc: Firmin Martin , git@vger.kernel.org, Johannes Schindelin , Erik Faye-Lund , Denton Liu Subject: Re: [PATCH v1 1/8] compat/terminal: let prompt accept input from pipe Message-ID: References: <20210506165102.123739-1-firminmartin24@gmail.com> <20210506165102.123739-2-firminmartin24@gmail.com> <875yzrgr1f.fsf@Inspiron.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Tue, May 11, 2021 at 12:38:10PM +0900, Junio C Hamano wrote: > >> I actually inspired myself from the two occurrences of git_prompt in > >> builtin/bisect--helper.c introduced in 09535f056b (bisect--helper: > >> reimplement `bisect_autostart` shell function in C, 2020-09-24). > >> Not sure if they should also be converted to a simple fgets. > > > > Yes, I think they should be switched. > > OK, that is because in the context of a "bisect" session, we won't > be feeding any real data from its standard input, unlike "git am" > that may well be eating a patch stream from its standard input > stream. If so, makes sense. Yes, though even in "git am", we forbid using interactive mode with patches on stdin (and did so even when we were reading from the tty; presumably the rule dates back to when it was a shell script and was using stdin). -Peff