Merge pull request #2973 from dokku/2796-git-quarantine

feat: allow usage of git 2.13.0+ by unsetting GIT_QUARANTINE_PATH during git worktree usage
This commit is contained in:
Jose Diaz-Gonzalez authored and GitHub committed 2017-11-05 16:07:59 -05:00
commit 158f10d321
2 files changed
+3 -4

No files matched your search

-3
View File
@@ -9,9 +9,6 @@ jobs:
make ci-dependencies make ci-dependencies
- run: | - run: |
./tests/ci/setup.sh ./tests/ci/setup.sh
- run: |
sudo apt-get remove -qq -y git
sudo apt-get install -qq -y git=1:1.9.1-1ubuntu0.7 git-man=1:1.9.1-1ubuntu0.7
- run: | - run: |
echo 'export DOKKU_SKIP_CLEANUP=true' | sudo tee /home/dokku/.dokkurc/dokku_skip_cleanup echo 'export DOKKU_SKIP_CLEANUP=true' | sudo tee /home/dokku/.dokkurc/dokku_skip_cleanup
- run: | - run: |
+3 -1
View File
@@ -38,7 +38,9 @@ git_build_app_repo() {
if use_git_worktree; then if use_git_worktree; then
# git worktree - this method uses git worktree which was introduced in git 2.5 # git worktree - this method uses git worktree which was introduced in git 2.5
pushd "$DOKKU_ROOT/$APP" > /dev/null pushd "$DOKKU_ROOT/$APP" > /dev/null
git worktree add "$GIT_BUILD_APP_REPO_TMP_WORK_DIR" "$REV" > /dev/null # unset the git quarantine path to allow us to use 2.13.0+
# See this issue for more information: https://github.com/dokku/dokku/issues/2796
env -u GIT_QUARANTINE_PATH git worktree add "$GIT_BUILD_APP_REPO_TMP_WORK_DIR" "$REV" > /dev/null
popd > /dev/null popd > /dev/null
pushd "$GIT_BUILD_APP_REPO_TMP_WORK_DIR" > /dev/null pushd "$GIT_BUILD_APP_REPO_TMP_WORK_DIR" > /dev/null
else else