MCPcopy Index your code
hub / github.com/idank/explainshell / gen_git_clone_cmd

Function gen_git_clone_cmd

tools/loadtest.py:91–101  ·  view source on GitHub ↗

git-clone-in-temp pipeline (fake-Chrome swarm shape).

(rng: random.Random)

Source from the content-addressed store, hash-verified

89
90
91def gen_git_clone_cmd(rng: random.Random) -> str:
92 """git-clone-in-temp pipeline (fake-Chrome swarm shape)."""
93 op1, op2, op3 = (_pick(OPENER_VARIANTS, rng) for _ in range(3))
94 ev = _pick(EVAL_VARIANTS, rng)
95 to = _pick(TOUCH_VARIANTS, rng)
96 return (
97 f"{op1} $(mktemp -d); git init a; "
98 f"({ev} a; {to} a; git add a; git commit -m a); "
99 f"git clone a b; ({op2} b; git checkout -b ignore-this); "
100 f"git clone a b2; ({op3} b2; git fetch origin -- --force --oneline -b -d -m)"
101 )
102
103
104def gen_log_processing_cmd(rng: random.Random) -> str:

Callers

nothing calls this directly

Calls 2

_pickFunction · 0.85
rangeFunction · 0.85

Tested by

no test coverage detected