release: guided install, onboarding in three languages, case folders stay private

This commit is contained in:
public-repo-gate
2026-08-29 21:00:38 +03:00
parent 94343aa3ee
commit 1c35dde17a
156 changed files with 275 additions and 12216 deletions
+5 -16
View File
@@ -544,7 +544,9 @@ def _push_files(local_sha: str, remote_sha: str) -> list[str]:
if remote_sha and not _ZERO_SHA_RE.match(remote_sha):
base = _commit_for_object(remote_sha)
if base:
return git_z("diff", "--name-only", "-z", f"{base}..{commit}")
# Удалённые пути не несут содержимого: их blob в уходящем коммите
# не существует, и fail-closed на нём — ложная тревога.
return git_z("diff", "--diff-filter=d", "--name-only", "-z", f"{base}..{commit}")
return git_z("ls-tree", "-r", "-z", "--name-only", commit)
@@ -621,21 +623,8 @@ exec python3 "$(git rev-parse --show-toplevel)/scripts/pd_guard.py" %s
def install() -> int:
common_dir = git("rev-parse", "--git-common-dir").strip()
if not common_dir:
print("не удалось найти git common dir", file=sys.stderr)
return 1
common_dir = common_dir if os.path.isabs(common_dir) else os.path.join(ROOT, common_dir)
hooks = os.path.join(os.path.abspath(common_dir), "hooks")
configured = subprocess.run(
["git", "config", "--local", "core.hooksPath", hooks],
cwd=ROOT,
capture_output=True,
text=True,
)
if configured.returncode != 0:
print(f"не удалось включить локальные git-хуки: {configured.stderr.strip()}", file=sys.stderr)
return 1
hooks = git("rev-parse", "--git-path", "hooks").strip() or ".git/hooks"
hooks = hooks if os.path.isabs(hooks) else os.path.join(ROOT, hooks)
os.makedirs(hooks, exist_ok=True)
for name, arg in (("pre-commit", "--staged"),
("commit-msg", '--msg "$1"'),