Answer prose round 1: 0 🔴, 5 🟡; reword the guards, code_of and the floor decision, file item 205

This commit is contained in:
2026-10-21 20:05:36 +02:00
parent d48344aa6d
commit 7c97005154
4 changed files with 13 additions and 8 deletions
+2 -2
View File
@@ -5,7 +5,7 @@ import subprocess
from failure import Failure
# The settings a guarded call gives git as -c options. A -c outranks the checkout's own config, which may allow one transport by name.
# A -c outranks the checkout's own config. Each transport gets its own line, since a config's protocol.<name>.allow outranks protocol.allow.
GUARD_SETTINGS = [
"core.fsmonitor=false",
"log.showSignature=false",
@@ -23,7 +23,7 @@ def git(*args: str, cwd: str | None = None, timeout: float | None = None, guarde
"""What git printed, run in cwd, else in the current directory.
A Failure where git cannot start, exits non-zero, prints text that is not UTF-8, or still runs after timeout seconds, which stops it.
guarded is for a checkout whose config may name a program, such as one rule-hook has not yet allowed a call to touch: no fsmonitor, no signature check, and no transport, so no fetch of a partial clone's missing objects either.
guarded turns off the fsmonitor, the signature check, each transport GUARD_SETTINGS names and a partial clone's fetch of its missing objects. It is for a checkout whose config may name a program.
"""
command = " ".join(args)
guards = [option for setting in GUARD_SETTINGS for option in ("-c", setting)] if guarded else []