Skip to content

armgit / mso

Public Imported from GitHub
0

Browser-based graphical shell and control plane for a Linux server you own — real terminal, file manager, live metrics and BYOK AI in one mobile-first workspace. Next.js 16 · React 19 · node-pty · Tailwind v4 · shadcn/ui. Public alpha, self-hosted.

fix(git): isolate push-gate test repositories

Rahman6fbd9a970a89
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index 68017f01..134e86ca 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -8,6 +8,7 @@ this is the *what*, and it is what Settings → About shows as “What's new”.
**Fixed**
+- `git` isolate push-gate test repositories
- `settings` improve MCP UI and activity scrolling
## 2026-08-21
diff --git a/scripts/gates.sh b/scripts/gates.sh
index 4d3d98aa..3f1e9727 100755
--- a/scripts/gates.sh
+++ b/scripts/gates.sh
@@ -20,6 +20,16 @@ set -e
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$ROOT"
+# Git exports repository-local environment variables to hooks (GIT_DIR,
+# GIT_WORK_TREE, GIT_INDEX_FILE, object directories, and friends). The test suite
+# intentionally creates temporary Git repositories; if those variables leak into a
+# child `git init`, Git can operate on THIS repository instead of the fixture.
+# Locate the root first, then clear only Git's documented local env so every child
+# Git process discovers the repository from its own cwd.
+while IFS= read -r git_local_var; do
+ [ -n "$git_local_var" ] && unset "$git_local_var"
+done < <(git rev-parse --local-env-vars 2>/dev/null || true)
+
if [ "${1-}" = "--install" ]; then
HOOK="$ROOT/.git/hooks/pre-push"
mkdir -p "$(dirname "$HOOK")"