MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / parseGitConfigValue

Function parseGitConfigValue

src/utils/git/gitConfigParser.ts:18–30  ·  view source on GitHub ↗
(
  gitDir: string,
  section: string,
  subsection: string | null,
  key: string,
)

Source from the content-addressed store, hash-verified

16 * Finds the first matching key under the given section/subsection.
17 */
18export async function parseGitConfigValue(
19 gitDir: string,
20 section: string,
21 subsection: string | null,
22 key: string,
23): Promise<string | null> {
24 try {
25 const config = await readFile(join(gitDir, 'config'), 'utf-8')
26 return parseConfigString(config, section, subsection, key)
27 } catch {
28 return null
29 }
30}
31
32/**
33 * Parse a config value from an in-memory config string.

Callers 3

performPostCreationSetupFunction · 0.85
computeRemoteUrlFunction · 0.85
getRemoteUrlForDirFunction · 0.85

Calls 2

readFileFunction · 0.85
parseConfigStringFunction · 0.85

Tested by

no test coverage detected