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 9E7301F5AE for ; Tue, 11 May 2021 19:11:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231896AbhEKTM7 (ORCPT ); Tue, 11 May 2021 15:12:59 -0400 Received: from cloud.peff.net ([104.130.231.41]:51124 "EHLO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231439AbhEKTM6 (ORCPT ); Tue, 11 May 2021 15:12:58 -0400 Received: (qmail 24224 invoked by uid 109); 11 May 2021 19:11:52 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Tue, 11 May 2021 19:11:52 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 27047 invoked by uid 111); 11 May 2021 19:11:52 -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 15:11:52 -0400 Authentication-Results: peff.net; auth=none Date: Tue, 11 May 2021 15:11:51 -0400 From: Jeff King To: Gregory Anders Cc: git@vger.kernel.org Subject: Re: [PATCH] git-send-email: use ! to indicate relative path to command Message-ID: References: <20210511183703.9488-1-greg@gpanders.com> 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 01:03:32PM -0600, Gregory Anders wrote: > I also noticed this after some quick testing and just sent a v2 right before > seeing your reply. > > Your (untested) implementation seems much cleaner than mine, and I'm happy > to give that a try. Question: is it okay that we pass just a raw command > name to exec instead of a full path? That is, is there any reason we need to > first find the command in PATH *and then* pass it to exec (which is what my > v2 implementation does)? I don't think so. Perl's exec() should do the PATH lookup itself. I was surprised not to see this mentioned explicitly in the documentation, but it clearly does work. E.g., try: perl -e 'exec("ls")' -Peff