From b404a87a89a98a0f5b5eeaf15b6ed479ee012d5f Mon Sep 17 00:00:00 2001 From: Daniel Wagenknecht Date: Tue, 16 Jul 2019 21:45:14 +0200 Subject: [PATCH 1/2] 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. --- yadm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yadm b/yadm index 8c5fe4d..4da57c7 100755 --- a/yadm +++ b/yadm @@ -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 From a399c35e4e4e05e1a9299960d2fe463957376fbd Mon Sep 17 00:00:00 2001 From: Tim Byrne Date: Mon, 29 Jul 2019 08:00:09 -0500 Subject: [PATCH 2/2] Add quoting --- yadm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yadm b/yadm index 4da57c7..b703b36 100755 --- a/yadm +++ b/yadm @@ -410,13 +410,13 @@ EOF # operate on the yadm repo's configuration file # this is always local to the machine - $GIT_PROGRAM config --local "$@" + "$GIT_PROGRAM" config --local "$@" CHANGES_POSSIBLE=1 else # operate on the yadm configuration file - $GIT_PROGRAM 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_PROGRAM --version 2>/dev/null) + git_version="$("$GIT_PROGRAM" --version 2>/dev/null)" if [[ "$git_version" =~ windows ]] ; then USE_CYGPATH=1 fi