From patchwork Mon Dec 16 21:32:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denton Liu X-Patchwork-Id: 11295323 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CED98109A for ; Mon, 16 Dec 2019 21:32:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ABA6224676 for ; Mon, 16 Dec 2019 21:32:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hA4LiBTN" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727523AbfLPVb7 (ORCPT ); Mon, 16 Dec 2019 16:31:59 -0500 Received: from mail-pj1-f65.google.com ([209.85.216.65]:46110 "EHLO mail-pj1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727119AbfLPVb6 (ORCPT ); Mon, 16 Dec 2019 16:31:58 -0500 Received: by mail-pj1-f65.google.com with SMTP id z21so3565673pjq.13 for ; Mon, 16 Dec 2019 13:31:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jyrqU080wLyAttD8V6qJSDhw6F6mFHPu94fY43EnDAY=; b=hA4LiBTNL9ic4iYPruYF7ufXp13QNuq7UMbIjJ6DGIi9DAKRuHlliRwdEsc3mi+jhM ErOSzTqA5TF210Zoc3lBqe7grVwiInLJMbM7ii9RWdPDeJOviZZcMxb+r7S9RvE7osno v5MLxWYKFXrg33D4odb0GnKL3Q1PpweKEiRd6ESumPPhNUY/NbE9tpj6FPGG771oOwxz +8fpTE+9Lym0DmiziXSUkodSkg6iprENGiIZ8nI7s14T2PDOBGQiiJxb7wQp72oRbXhg k1MQiUNCBTmYinxmrfrlxkF6Ytw6IMqs5XmIWgNiXY3xxu9Umgbgxl/8hHpRkqRHkgIt IbnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jyrqU080wLyAttD8V6qJSDhw6F6mFHPu94fY43EnDAY=; b=WQPVaQa5dI3hqy47J7DfmRGAeQ7PWTPYhuH2mI4t47o/mF3VytZ8rnhWv+yo7adBCq l3Sb5QyGRYVisdQhibynmJ8mMyFTvgW2WQmMsS/tOyDQ2TXYNrMe/atN2MXGSq0eM1VA ii9V1qBXsyfHG30nkCXaC4gzmii7dT70oXOUTwjV5xAzKPTxQZOtdbqbdTm9DZce3vHa NA8ZcCPoHXr9qO5b7Sca5Xt1xleL1TGkxmELnnpJ3ntPdYh2ehCrniOIw3MRNXkKqN/x 2vDWK2CEaV+/MpfOZY0ppnnREy4CM1LFOl6kmDZ5qXVW6bEU5JAnL73OY/Sd9KpadwTI g/9Q== X-Gm-Message-State: APjAAAUDPMynAX9dfVV99ci0oyscQJCxYehlCw+aXxWYt0NmjQZwbr7C ZX/IRk1Ws8qEDfWjVw20e3uGo+y8 X-Google-Smtp-Source: APXvYqwtZWCzrGLL6PVxIJXECuUpl3b/+josga0bI1UHj5zeS/smXMlC2edBdiPt74OkI32/qbYX2g== X-Received: by 2002:a17:90a:b38f:: with SMTP id e15mr1680877pjr.101.1576531917700; Mon, 16 Dec 2019 13:31:57 -0800 (PST) Received: from dentonliu-ltm.internal.salesforce.com ([204.14.239.53]) by smtp.gmail.com with ESMTPSA id q6sm23951063pfl.140.2019.12.16.13.31.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Dec 2019 13:31:56 -0800 (PST) From: Denton Liu To: Git Mailing List Cc: Luis Marsano , Ted Zlatanov Subject: [PATCH 1/2] contrib/credential/netrc: make PERL_PATH configurable Date: Mon, 16 Dec 2019 13:32:33 -0800 Message-Id: X-Mailer: git-send-email 2.24.1.664.g198078bb5a In-Reply-To: References: MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org The shebang path for the Perl interpreter in git-credential-netrc was hardcoded. However, some users may have it located at a different location and thus, would have had to manually edit the script. Add a .perl prefix to the script to denote it as a template and ignore the generated version. Augment the Makefile so that it generates git-credential-netrc from git-credential-netrc.perl, just like other Perl scripts. The Makefile recipes were shamelessly stolen from contrib/mw-to-git/Makefile. Signed-off-by: Denton Liu --- contrib/credential/netrc/.gitignore | 1 + contrib/credential/netrc/Makefile | 26 +++++++++++++++++-- ...ential-netrc => git-credential-netrc.perl} | 0 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 contrib/credential/netrc/.gitignore rename contrib/credential/netrc/{git-credential-netrc => git-credential-netrc.perl} (100%) diff --git a/contrib/credential/netrc/.gitignore b/contrib/credential/netrc/.gitignore new file mode 100644 index 0000000000..d41cdde84b --- /dev/null +++ b/contrib/credential/netrc/.gitignore @@ -0,0 +1 @@ +git-credential-netrc diff --git a/contrib/credential/netrc/Makefile b/contrib/credential/netrc/Makefile index 6174e3bb83..c284fb8ac4 100644 --- a/contrib/credential/netrc/Makefile +++ b/contrib/credential/netrc/Makefile @@ -1,8 +1,30 @@ # The default target of this Makefile is... all:: -test: +SCRIPT_PERL = git-credential-netrc.perl +GIT_ROOT_DIR = ../../.. +HERE = contrib/credential/netrc + +SCRIPT_PERL_FULL = $(patsubst %,$(HERE)/%,$(SCRIPT_PERL)) + +all:: build + +build: + $(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL="$(SCRIPT_PERL_FULL)" \ + build-perl-script + +install: build + $(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL="$(SCRIPT_PERL_FULL)" \ + install-perl-script + +clean: + $(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL="$(SCRIPT_PERL_FULL)" \ + clean-perl-script + +test: build ./t-git-credential-netrc.sh -testverbose: +testverbose: build ./t-git-credential-netrc.sh -d -v + +.PHONY: all build install clean test testverbose diff --git a/contrib/credential/netrc/git-credential-netrc b/contrib/credential/netrc/git-credential-netrc.perl similarity index 100% rename from contrib/credential/netrc/git-credential-netrc rename to contrib/credential/netrc/git-credential-netrc.perl