From 55cfed993b453bd488fff63df345e984a016a74b Mon Sep 17 00:00:00 2001 From: Matthieu Moy Date: Fri, 11 Mar 2016 22:24:25 +0100 Subject: [PATCH] work around a bug in some Git versions Fixes #13. --- git-latexdiff | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/git-latexdiff b/git-latexdiff index 1e4055b..03d6af6 100755 --- a/git-latexdiff +++ b/git-latexdiff @@ -41,6 +41,12 @@ set -o errexit set -o noclobber +# Some versions of git set $GIT_WORK_TREE when ran through an alias. +# This wouldn't work with git-latexdiff which plays with different +# work trees. +unset GIT_DIR +unset GIT_WORK_TREE + # (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