From 57a9787012f47969004c7fb3c2f8bb6e5b289bb9 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 15 Feb 2022 14:44:53 -0800 Subject: [PATCH] Sync eng/common directory with azure-sdk-tools for PR 2754 (#23070) * Add configs * Update eng/common/pipelines/templates/steps/credscan.yml Co-authored-by: Wes Haggard * Adding commnets * wrong order * Update credscan.yml * Update credscan.yml Co-authored-by: sima-zhu Co-authored-by: Sima Zhu <48036328+sima-zhu@users.noreply.github.com> Co-authored-by: Wes Haggard --- eng/common/pipelines/templates/steps/credscan.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/eng/common/pipelines/templates/steps/credscan.yml b/eng/common/pipelines/templates/steps/credscan.yml index a202961a30e0..d2704bce6f22 100644 --- a/eng/common/pipelines/templates/steps/credscan.yml +++ b/eng/common/pipelines/templates/steps/credscan.yml @@ -8,7 +8,11 @@ steps: - pwsh: | if ("$(Build.Reason)" -eq 'PullRequest') { $targetBranch = "origin/$(System.PullRequest.TargetBranch)" -replace "refs/heads/" - $changedFiles = git diff $targetBranch HEAD --name-only --diff-filter=d + + # Add config to disable the quote and encoding on file name. + # Ref: https://github.com/msysgit/msysgit/wiki/Git-for-Windows-Unicode-Support#disable-quoted-file-names + # Ref: https://github.com/msysgit/msysgit/wiki/Git-for-Windows-Unicode-Support#disable-commit-message-transcoding + $changedFiles = git -c core.quotepath=off -c i18n.logoutputencoding=utf-8 diff $targetBranch HEAD --name-only --diff-filter=d $changedFiles | ForEach-Object { Add-Content -Path "${{ parameters.SourceDirectory }}/credscan.tsv" -Value "${{ parameters.SourceDirectory }}/$_"} } else {