Due to the way submodules are organized in the latest versions of Git,
the working directory in the submodule repository configuration is set
to the relative path of submodule with respect to its physical GIT_DIR
location, instead of default ".". This confuses git-update-index, and
causes `pristine-tar commit' to fail.
# index, and without touching the working tree. Aka deep
# git magick.
$ENV{GIT_INDEX_FILE}="$tempdir/index";
+ $ENV{GIT_WORK_TREE}="$tempdir";
if (! exists $ENV{GIT_DIR} || ! length $ENV{GIT_DIR}) {
$ENV{GIT_DIR}=getcwd."/.git";
}