From 1d0dc0e8ed24b2559357203d1be28b6ab069ab59 Mon Sep 17 00:00:00 2001 From: Pierre-Alain Dupont Date: Mon, 12 Sep 2016 14:41:55 +0200 Subject: [PATCH] Adds support for submodules --- git-latexdiff | 3 +++ 1 file changed, 3 insertions(+) diff --git a/git-latexdiff b/git-latexdiff index b6ac0cb..d9eb680 100755 --- a/git-latexdiff +++ b/git-latexdiff @@ -528,6 +528,8 @@ fi # Checkout a subtree, without touching the index ("git checkout" would) (cd "$git_dir" && git archive --format=tar "$old" "$checkoutroot") | tar -xf - +# Also expand the possible submodules +(cd "$git_worktree" && git submodule foreach 'git archive --format=tar "$sha1" | tar -xf - --directory '$tmpdir/old'/$path') verbose_progress cd ../new || die "Cannot cd to new/" if test "$new" == "--"; then @@ -536,6 +538,7 @@ if test "$new" == "--"; then else # checkout new revision (cd "$git_dir" && git archive --format=tar "$new" "$checkoutroot") | tar -xf - + (cd "$git_worktree" && git submodule foreach 'git archive --format=tar "$sha1" | tar -xf - --directory '$tmpdir/new'/$path') fi if test "$ln_untracked" = 1; then (