mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-09 03:22:40 +00:00
fix(crabbox): refresh stale changed-gate git metadata
This commit is contained in:
@@ -1501,11 +1501,14 @@ function mergeBaseForChangedGate() {
|
||||
function remoteGitBootstrapForChangedGate(changedGateBase) {
|
||||
const quotedBase = shellQuote(changedGateBase);
|
||||
return [
|
||||
"if ! git status --short >/dev/null 2>&1; then",
|
||||
"openclaw_changed_gate_base=${OPENCLAW_CHANGED_GATE_BASE:-" + quotedBase + "};",
|
||||
'if ! command -v git >/dev/null 2>&1; then echo "git is required for OpenClaw remote changed-gate sync" >&2; exit 2; fi;',
|
||||
'openclaw_changed_gate_remote_base="$(git rev-parse --verify refs/remotes/origin/main 2>/dev/null || true)";',
|
||||
'if ! git status --short >/dev/null 2>&1 || [ "$openclaw_changed_gate_remote_base" != "$openclaw_changed_gate_base" ]; then',
|
||||
"rm -rf .git;",
|
||||
"git init -q;",
|
||||
"git remote add origin https://github.com/openclaw/openclaw.git 2>/dev/null || git remote set-url origin https://github.com/openclaw/openclaw.git;",
|
||||
`git fetch -q --depth=1 origin ${quotedBase}:refs/remotes/origin/main;`,
|
||||
'git fetch -q --depth=1 origin "$openclaw_changed_gate_base:refs/remotes/origin/main";',
|
||||
"git reset --mixed --quiet refs/remotes/origin/main;",
|
||||
"git add -A;",
|
||||
"if ! git diff --cached --quiet; then git -c user.name=OpenClaw -c user.email=ci@openclaw.local commit -q --no-gpg-sign -m remote-changed-gate-tree; fi;",
|
||||
|
||||
Reference in New Issue
Block a user