From a985a4fab0aad1d4771a923ce7f45a42738c60eb Mon Sep 17 00:00:00 2001 From: Matthieu Moy Date: Sun, 10 May 2015 20:50:18 +0200 Subject: [PATCH] unset CDPATH --- git-latexdiff | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/git-latexdiff b/git-latexdiff index 7367d12..408ec0b 100755 --- a/git-latexdiff +++ b/git-latexdiff @@ -41,6 +41,14 @@ set -o errexit set -o noclobber +# (Comment and 'unset' line borrowed from Git's source code) +# Having this variable in your environment would break scripts because +# you would cause "cd" to be taken to unexpected places. If you +# like CDPATH, define it for your interactive shell sessions without +# exporting it. +# But we protect ourselves from such a user mistake nevertheless. +unset CDPATH + git_latexdiff_version='@GIT_LATEXDIFF_VERSION@' git_latexdiff_compute_version () {