Skip to content

Commit 07f5165

Browse files
azure-sdksima-zhuweshaggard
authored
Sync eng/common directory with azure-sdk-tools for PR 2754 (Azure#20390)
* Add configs * Update eng/common/pipelines/templates/steps/credscan.yml Co-authored-by: Wes Haggard <[email protected]> * Adding commnets * wrong order * Update credscan.yml * Update credscan.yml Co-authored-by: sima-zhu <[email protected]> Co-authored-by: Sima Zhu <[email protected]> Co-authored-by: Wes Haggard <[email protected]>
1 parent bd4b77b commit 07f5165

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

eng/common/pipelines/templates/steps/credscan.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ steps:
88
- pwsh: |
99
if ("$(Build.Reason)" -eq 'PullRequest') {
1010
$targetBranch = "origin/$(System.PullRequest.TargetBranch)" -replace "refs/heads/"
11-
$changedFiles = git diff $targetBranch HEAD --name-only --diff-filter=d
11+
12+
# Add config to disable the quote and encoding on file name.
13+
# Ref: https://github.com/msysgit/msysgit/wiki/Git-for-Windows-Unicode-Support#disable-quoted-file-names
14+
# Ref: https://github.com/msysgit/msysgit/wiki/Git-for-Windows-Unicode-Support#disable-commit-message-transcoding
15+
$changedFiles = git -c core.quotepath=off -c i18n.logoutputencoding=utf-8 diff $targetBranch HEAD --name-only --diff-filter=d
1216
$changedFiles | ForEach-Object { Add-Content -Path "${{ parameters.SourceDirectory }}/credscan.tsv" -Value "${{ parameters.SourceDirectory }}/$_"}
1317
}
1418
else {

0 commit comments

Comments
 (0)