File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,10 @@ param(
3030 [string ] $RemoteName = " azure-sdk-fork" ,
3131
3232 [Parameter (Mandatory = $false )]
33- [boolean ] $SkipCommit = $false
33+ [boolean ] $SkipCommit = $false ,
34+
35+ [Parameter (Mandatory = $false )]
36+ [boolean ] $AmendCommit = $false
3437)
3538
3639# This is necessay because of the janky git command output writing to stderr.
@@ -66,8 +69,14 @@ if ($LASTEXITCODE -ne 0)
6669}
6770
6871if (! $SkipCommit ) {
69- Write-Host " git -c user.name=`" azure-sdk`" -c user.email=`" azuresdk@microsoft.com`" commit --amend -am `" $ ( $CommitMsg ) `" "
70- git - c user.name= " azure-sdk" - c user.email= " azuresdk@microsoft.com" commit -- amend - am " $ ( $CommitMsg ) "
72+ if ($AmendCommit ) {
73+ $amendOption = " --amend"
74+ }
75+ else {
76+ $amendOption = " "
77+ }
78+ Write-Host " git -c user.name=`" azure-sdk`" -c user.email=`" azuresdk@microsoft.com`" commit $amendOption -am `" $ ( $CommitMsg ) `" "
79+ git - c user.name= " azure-sdk" - c user.email= " azuresdk@microsoft.com" commit $amendOption - am " $ ( $CommitMsg ) "
7180 if ($LASTEXITCODE -ne 0 )
7281 {
7382 Write-Error " Unable to add files and create commit LASTEXITCODE=$ ( $LASTEXITCODE ) , see command output above."
You can’t perform that action at this time.
0 commit comments