Replace direkt calls to git with $GIT_PROGRAM

Some calls to git ignored the yadm.gpg-program configuration option
and called the first git found in $PATH instead. Make them adhere to
the configured git program by replacing the call with $GIT_PROGRAM.
This commit is contained in:
Daniel Wagenknecht 2019-07-16 21:45:14 +02:00
parent 6df8509999
commit b404a87a89
No known key found for this signature in database
GPG Key ID: B9D5F09323F03F90
1 changed files with 3 additions and 3 deletions

6
yadm
View File

@ -410,13 +410,13 @@ EOF
# operate on the yadm repo's configuration file
# this is always local to the machine
git config --local "$@"
$GIT_PROGRAM config --local "$@"
CHANGES_POSSIBLE=1
else
# operate on the yadm configuration file
git config --file="$(mixed_path "$YADM_CONFIG")" "$@"
$GIT_PROGRAM config --file="$(mixed_path "$YADM_CONFIG")" "$@"
fi
@ -844,7 +844,7 @@ function set_operating_system() {
case "$OPERATING_SYSTEM" in
CYGWIN*)
git_version=$(git --version 2>/dev/null)
git_version=$($GIT_PROGRAM --version 2>/dev/null)
if [[ "$git_version" =~ windows ]] ; then
USE_CYGPATH=1
fi