From a6f7f5f0e1bac2ba4598795ad5db707f1f39a9c2 Mon Sep 17 00:00:00 2001 From: Weston McNamee Date: Fri, 8 Jul 2022 22:35:50 -0700 Subject: [PATCH] Revert "feat(deploy): copy local git config to tmp repo (#7702)" This reverts commit ee376d19f6c5f2dd714c94941901665d2ce174a5. All git config fields can be set via the GIT_CONFIG_KEY_ and GIT_CONFIG_VALUE_ env vars. Ref: https://git-scm.com/docs/git-config#Documentation/git-config.txt-GITCONFIGCOUNT Alternatively, you can also use the conditional includes feature of git config. Ref: https://git-scm.com/docs/git-config#_conditional_includes fixes #7744 --- packages/docusaurus/src/commands/deploy.ts | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/packages/docusaurus/src/commands/deploy.ts b/packages/docusaurus/src/commands/deploy.ts index 530d159b119b..90d6f9cc5ee7 100644 --- a/packages/docusaurus/src/commands/deploy.ts +++ b/packages/docusaurus/src/commands/deploy.ts @@ -183,9 +183,6 @@ You can also set the deploymentBranch property in docusaurus.config.js .`); // Save the commit hash that triggers publish-gh-pages before checking // out to deployment branch. const currentCommit = shellExecLog('git rev-parse HEAD').stdout.trim(); - const currentGitRootDir = shellExecLog( - 'git rev-parse --show-toplevel', - ).stdout.trim(); const runDeploy = async (outputDirectory: string) => { const fromPath = outputDirectory; @@ -216,16 +213,6 @@ You can also set the deploymentBranch property in docusaurus.config.js .`); logger.error`Copying build assets from path=${fromPath} to path=${toPath} failed.`; throw err; } - - const gitConfigFromPath = path.join(currentGitRootDir, `.git`, `config`); - const gitConfigToPath = path.join(toPath, `.git`, `config`); - try { - await fs.copy(gitConfigFromPath, gitConfigToPath); - } catch (err) { - logger.error`Copying git config from path=${gitConfigFromPath} to path=${gitConfigToPath} failed.`; - throw err; - } - shellExecLog('git add --all'); const commitMessage =