From patchwork Wed Oct 24 07:36:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff King X-Patchwork-Id: 10654291 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6BB1F14BB for ; Wed, 24 Oct 2018 07:36:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 538342A6C7 for ; Wed, 24 Oct 2018 07:36:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 47CE32A6C9; Wed, 24 Oct 2018 07:36:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E273A2A6C7 for ; Wed, 24 Oct 2018 07:36:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729882AbeJXQDe (ORCPT ); Wed, 24 Oct 2018 12:03:34 -0400 Received: from cloud.peff.net ([104.130.231.41]:52418 "HELO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1729690AbeJXQDd (ORCPT ); Wed, 24 Oct 2018 12:03:33 -0400 Received: (qmail 7375 invoked by uid 109); 24 Oct 2018 07:36:38 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with SMTP; Wed, 24 Oct 2018 07:36:38 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 2178 invoked by uid 111); 24 Oct 2018 07:35:52 -0000 Received: from sigill.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.7) by peff.net (qpsmtpd/0.94) with (ECDHE-RSA-AES256-GCM-SHA384 encrypted) SMTP; Wed, 24 Oct 2018 03:35:52 -0400 Authentication-Results: peff.net; auth=none Received: by sigill.intra.peff.net (sSMTP sendmail emulation); Wed, 24 Oct 2018 03:36:37 -0400 Date: Wed, 24 Oct 2018 03:36:37 -0400 From: Jeff King To: git@vger.kernel.org Cc: Junio C Hamano Subject: [PATCH 0/2] run-command: fix Unix PATH lookup Message-ID: <20181024073637.GA31069@sigill.intra.peff.net> MIME-Version: 1.0 Content-Disposition: inline Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This series fixes a bug where run-command.c accidentally runs commands from the current directory when they are not found in the $PATH. The second patch is the interesting one. The first one is just a necessary cleanup. Possibly this should be split into two topics: the second patch slated for maint, and then the first one as an independent fixup on tb/filter-alternate-refs (which is in master). [1/2]: t5410: use longer path for sample script [2/2]: run-command: mark path lookup errors with ENOENT run-command.c | 20 ++++++++++++++++---- t/t0061-run-command.sh | 13 ++++++++++++- t/t5410-receive-pack-alternates.sh | 2 +- 3 files changed, 29 insertions(+), 6 deletions(-) -Peff