From af6e9d027dbcbfbeed145d24ca152a92de2af568 Mon Sep 17 00:00:00 2001 From: Victor Vasiliev Date: Thu, 10 Oct 2013 22:23:15 -0400 Subject: [PATCH] Handle Git submodules correctly 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. --- pristine-tar | 1 + 1 file changed, 1 insertion(+) diff --git a/pristine-tar b/pristine-tar index 184c657..9005ddb 100755 --- a/pristine-tar +++ b/pristine-tar @@ -727,6 +727,7 @@ sub commitdelta { # 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"; } -- 2.34.1