reload re-reads the config from disk into the shared config, using the reloadConfig seam when set and the real ghConfig.Reload otherwise. The production fallback passes fallbackConfig so a config file deleted between reads is restored to gh's defaults, matching NewConfig.
()
| 131 | // ghConfig.Reload otherwise. The production fallback passes fallbackConfig so a config file deleted between reads is |
| 132 | // restored to gh's defaults, matching NewConfig. |
| 133 | func (c *AuthConfig) reload() error { |
| 134 | if c.reloadConfig != nil { |
| 135 | return c.reloadConfig() |
| 136 | } |
| 137 | return ghConfig.Reload(fallbackConfig()) |
| 138 | } |
| 139 | |
| 140 | // LoginRefreshable stores a refreshable credential for the user, sets the git protocol, and activates the user. It |
| 141 | // mirrors Login: secure storage is preferred and the insecure configuration is used as a fallback, reported via the |
no test coverage detected