Development record
Every scanner.New spends four git execs reading the caller's identity: ProbeIdentity (internal/adapter/scanner/identity.go) runs git config --get-all user.name, --get-all user.email, -z --get-regexp over user/author/committer name and email, and --get remote.origin.url, each a separate process under the scrubbed env, although the first, second and fourth read the same configuration the third lists. The review of the ciFast lane counted about 2,193 such execs per cli test run; the cost lands on every CLI verb and hook that builds a scanner. One NUL-delimited listing under the same env yields everything the four did.
Every scanner.New spends four git execs reading the caller's identity: ProbeIdentity (internal/adapter/scanner/identity.go) runs git config --get-all user.name, --get-all user.email, -z --get-regexp over user/author/committer name and email, and --get remote.origin.url, each a separate process under the scrubbed env, although the first, second and fourth read the same configuration the third lists. The review of the ciFast lane counted about 2,193 such execs per cli test run; the cost lands on every CLI verb and hook that builds a scanner. One NUL-delimited listing under the same env yields everything the four did.
Grounds
- pursued: scanner.New spends one git exec on identity with no -c configuration in the parent and two with it, and ProbeIdentity answers every pinned shape exactly as the four-exec probe did; a counting-shim run above one exec, or any pinned shape answering differently, would show it wrong
Frontmatter
| id | iss-2609281546130900 |
|---|---|
| type | issue |
| lifecycle | resolved |
| severity | minor |
.abcd/work/issues/resolved/iss-2609281546130900-every-scanner-new-spends-four-git-execs.md
open on GitHub ↗ · commit history ↗