From 2d60066844b4ec0ac90c069c0680086b78db7e81 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Mon, 14 Nov 2016 07:16:47 -0800 Subject: [PATCH] hg-{fast-export,reset}.sh: add git --exec-path to PATH Starting with Git 2.10.0, the git-sh-setup script expects the git --exec-path directory to be in the PATH or it will fail. Although there is a patch in the works to correct this, many of the other scripts in the --exec-path directory also assume the same thing. Explicitly add git --exec-path to the front of the PATH just like Git normally does so that git-sh-setup starts working again without need of the patch and to future-proof the code against similar breakage in the future. As a result also switch to just plain ". git-sh-setup" to match how the rest of the scripts in --exec-path run the setup script. Signed-off-by: Kyle J. McKay --- hg-fast-export.sh | 3 ++- hg-reset.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hg-fast-export.sh b/hg-fast-export.sh index 331979c..5f87434 100755 --- a/hg-fast-export.sh +++ b/hg-fast-export.sh @@ -45,7 +45,8 @@ case "$1" in echo "$LONG_USAGE" exit 0 esac -. "$(git --exec-path)/git-sh-setup" +PATH="$(git --exec-path):$PATH" && export PATH +. git-sh-setup cd_to_toplevel while case "$#" in 0) break ;; esac diff --git a/hg-reset.sh b/hg-reset.sh index e9a1f35..baf0852 100755 --- a/hg-reset.sh +++ b/hg-reset.sh @@ -24,7 +24,8 @@ Options: -r Mercurial repository to use " -. "$(git --exec-path)/git-sh-setup" +PATH="$(git --exec-path):$PATH" && export PATH +. git-sh-setup cd_to_toplevel while case "$#" in 0) break ;; esac -- 2.11.4.GIT