livrare.ps1: fisierul de mesaj fara BOM

Out-File -Encoding utf8 in PS 5.1 scrie BOM, care ajungea ca prim caracter in
mesajul de commit (ex. un mesaj despre "sync SVN"). Se scrie cu
[IO.File]::WriteAllText si UTF8Encoding $false.

Nota in scripturi-uzuale.md: mesajele catre git/svn din PowerShell trec prin
fisier, UTF-8 fara BOM, LF.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014sNn6dmAimtyXkDU4frJrh
This commit is contained in:
2026-08-03 18:26:41 +03:00
parent f4b48d9c20
commit 1d3e75803f
2 changed files with 11 additions and 1 deletions

View File

@@ -386,7 +386,9 @@ try {
$mesajDir = Join-Path ([System.IO.Path]::GetTempPath()) ('livrare_' + [guid]::NewGuid().ToString('N'))
New-Item -ItemType Directory -Path $mesajDir | Out-Null
$mesajFile = Join-Path $mesajDir 'mesaj_commit.txt'
$Mesaj | Out-File -FilePath $mesajFile -Encoding utf8
# UTF8Encoding($false): fara BOM - Out-File -Encoding utf8 scrie BOM in PS 5.1, iar git
# il baga in mesajul de commit ca prim caracter (U+FEFF) daca-l citim cu -F.
[System.IO.File]::WriteAllText($mesajFile, $Mesaj, (New-Object System.Text.UTF8Encoding $false))
$exitCode += (Comite-Si-Impinge $ProjectRoot 'proiect' $FaraPush $mesajFile)