Merge branch 'dl/credential-netrc'
Sample credential helper for using .netrc has been updated to work out of the box. * dl/credential-netrc: contrib/credential/netrc: work outside a repo contrib/credential/netrc: make PERL_PATH configurable
This commit is contained in:
1
contrib/credential/netrc/.gitignore
vendored
Normal file
1
contrib/credential/netrc/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
git-credential-netrc
|
@ -1,8 +1,30 @@
|
|||||||
# The default target of this Makefile is...
|
# The default target of this Makefile is...
|
||||||
all::
|
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
|
./t-git-credential-netrc.sh
|
||||||
|
|
||||||
testverbose:
|
testverbose: build
|
||||||
./t-git-credential-netrc.sh -d -v
|
./t-git-credential-netrc.sh -d -v
|
||||||
|
|
||||||
|
.PHONY: all build install clean test testverbose
|
||||||
|
@ -423,7 +423,7 @@ sub load_config {
|
|||||||
# load settings from git config
|
# load settings from git config
|
||||||
my $options = shift;
|
my $options = shift;
|
||||||
# set from command argument, gpg.program option, or default to gpg
|
# set from command argument, gpg.program option, or default to gpg
|
||||||
$options->{'gpg'} //= Git->repository()->config('gpg.program')
|
$options->{'gpg'} //= Git::config('gpg.program')
|
||||||
// 'gpg';
|
// 'gpg';
|
||||||
log_verbose("using $options{'gpg'} for GPG operations");
|
log_verbose("using $options{'gpg'} for GPG operations");
|
||||||
}
|
}
|
Reference in New Issue
Block a user