From 49ddda4cfe00b6010010830086c8e16c05ec8751 Mon Sep 17 00:00:00 2001 From: jingjingjia-ms Date: Tue, 30 Jun 2026 15:46:22 -0700 Subject: [PATCH] ci: enable git core.longpaths before anonymous clone in app-auth path The app-auth clone path (added in #1442) replaced the built-in checkout: task with a manual 'git clone'. The checkout: task implicitly enables core.longpaths, but the manual clone does not, so checkout of deeply-nested Kiota request builders (e.g. Agents-M365Copilot copilot/reports get_microsoft365_copilot_*_with_period builders) overflows the Windows MAX_PATH (260) limit and fails with 'Filename too long'. Set core.longpaths=true before the clone to restore the long-path support the built-in checkout previously provided. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../generation-templates/language-generation-kiota.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.azure-pipelines/generation-templates/language-generation-kiota.yml b/.azure-pipelines/generation-templates/language-generation-kiota.yml index 019ab0c64..2bcccca70 100644 --- a/.azure-pipelines/generation-templates/language-generation-kiota.yml +++ b/.azure-pipelines/generation-templates/language-generation-kiota.yml @@ -89,6 +89,7 @@ steps: - pwsh: | $repoDir = "$(Build.SourcesDirectory)/${{ parameters.repoName }}" if (Test-Path $repoDir) { Remove-Item $repoDir -Recurse -Force } + git config --global core.longpaths true git clone --depth 1 "https://github.com/${{ parameters.orgName }}/${{ parameters.repoName }}.git" "$repoDir" if ($LASTEXITCODE -ne 0) { throw "Failed to clone ${{ parameters.orgName }}/${{ parameters.repoName }}" } displayName: 'Clone ${{ parameters.repoName }} (anonymous, public repo)'