DetectConfiguredHelper reads the git credential helper configured for hostname and returns its category ("ours", "other", or "none"), or "error" when the read fails. It performs its own read instead of relying on Prompt having run, so callers can observe the helper even for non-interactive or SSH si
(hostname string)
| 141 | // setup runs. The read is intentionally not cached: a repeated read inside Prompt stays cheap and keeps each caller's |
| 142 | // error handling independent. |
| 143 | func (flow *GitCredentialFlow) DetectConfiguredHelper(hostname string) string { |
| 144 | flow.helper, flow.helperDetectErr = flow.HelperConfig.ConfiguredHelper(hostname) |
| 145 | if flow.helperDetectErr != nil { |
| 146 | return "error" |
| 147 | } |
| 148 | return helperCategory(flow.helper) |
| 149 | } |
| 150 | |
| 151 | // ResultingHelperCategory reports the git credential helper in effect after Setup ran, as one of "ours", "other", or |
| 152 | // "none", or "error" when helper detection failed and no setup replaced it. It reflects the flow's own decisions |