Skip to content

Commit 1c78c78

Browse files
Denton-Lgitster
authored andcommitted
contrib/credential/netrc: make PERL_PATH configurable
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 <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 53a06cf commit 1c78c78

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
git-credential-netrc

contrib/credential/netrc/Makefile

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,30 @@
11
# The default target of this Makefile is...
22
all::
33

4-
test:
4+
SCRIPT_PERL = git-credential-netrc.perl
5+
GIT_ROOT_DIR = ../../..
6+
HERE = contrib/credential/netrc
7+
8+
SCRIPT_PERL_FULL = $(patsubst %,$(HERE)/%,$(SCRIPT_PERL))
9+
10+
all:: build
11+
12+
build:
13+
$(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL="$(SCRIPT_PERL_FULL)" \
14+
build-perl-script
15+
16+
install: build
17+
$(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL="$(SCRIPT_PERL_FULL)" \
18+
install-perl-script
19+
20+
clean:
21+
$(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL="$(SCRIPT_PERL_FULL)" \
22+
clean-perl-script
23+
24+
test: build
525
./t-git-credential-netrc.sh
626

7-
testverbose:
27+
testverbose: build
828
./t-git-credential-netrc.sh -d -v
29+
30+
.PHONY: all build install clean test testverbose
File renamed without changes.

0 commit comments

Comments
 (0)