|
|
@@ -9,7 +9,16 @@ if (-not (Test-Path -LiteralPath $invoke)) { throw "missing remote implementatio
|
|
|
switch ($Command) {
|
|
|
'doctor' { & (Join-Path $root 'windows\remote-doctor.ps1') @Args }
|
|
|
'status' { & (Join-Path $root 'windows\remote-status.ps1') @Args }
|
|
|
- 'sync' { & (Join-Path $root 'windows\sync-to-remote.ps1') @Args }
|
|
|
+ 'sync' {
|
|
|
+ # Source authority is Git exact-commit. The SSH remote is canonical;
|
|
|
+ # the HTTP endpoint is a one-shot fallback when the SSH daemon is down.
|
|
|
+ & git push lan HEAD:codex/6400-front-rear-p0fix-local @Args
|
|
|
+ if ($LASTEXITCODE -ne 0) {
|
|
|
+ $http = 'http://36.134.23.28:3000/haitaowang1001/CPLD_temperature_control_board.git'
|
|
|
+ $env:GIT_TERMINAL_PROMPT = '0'
|
|
|
+ & git push $http HEAD:refs/heads/codex/6400-front-rear-p0fix-local @Args
|
|
|
+ }
|
|
|
+ }
|
|
|
'fetch' { & (Join-Path $root 'windows\sync-from-remote.ps1') @Args }
|
|
|
default { & $invoke @Args }
|
|
|
}
|