From 079068091481cd38d958b47632f11e38f6c4046c Mon Sep 17 00:00:00 2001 From: 8kalinow <8kalinow@informatik.uni-hamburg.de> Date: Wed, 14 Aug 2013 19:48:52 +0200 Subject: [PATCH] Check git-dir before cd-ing out of it. --- git-latexdiff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-latexdiff b/git-latexdiff index 978c93b..d7671b4 100755 --- a/git-latexdiff +++ b/git-latexdiff @@ -272,8 +272,8 @@ fi verbose "Creating temporary directories" git_prefix=$(git rev-parse --show-prefix) -cd "$(git rev-parse --show-cdup)" || die "Can't cd back to repository root" git_dir="$(git rev-parse --git-dir)" || die "Not a git repository?" +cd "$(git rev-parse --show-cdup)" || die "Can't cd back to repository root" git_dir=$(cd "$git_dir"; pwd) main=$git_prefix/$main