From 36355b41657e17812f72c15ecb4e090ea1249c3b Mon Sep 17 00:00:00 2001 From: Joshua Nathaniel Pritikin Date: Mon, 11 Nov 2013 14:57:26 -0500 Subject: [PATCH] Use git archive for checkout --- git-latexdiff | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-latexdiff b/git-latexdiff index ded22f4..7cf892f 100755 --- a/git-latexdiff +++ b/git-latexdiff @@ -361,7 +361,7 @@ else checkoutroot="." fi -git --git-dir="$git_dir" --work-tree=. checkout "$old" -- "$checkoutroot" || die "checkout failed for old/" +(cd "$git_dir" && git archive --format=tar "$old" "$checkoutroot") | tar -xf - verbose_progress cd ../new || die "Cannot cd to new/" if test "$ln_untracked" = 1; then @@ -370,7 +370,7 @@ fi if test "$new" != "--"; then # if new == "--" then diff working dir (already there thanks to ln # -s above). - git --git-dir="$git_dir" --work-tree=. checkout "$new" -- "$checkoutroot" || die "checkout failed for new/" + (cd "$git_dir" && git archive --format=tar "$new" "$checkoutroot") | tar -xf - fi verbose_progress cd ..