MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / parseGitConfigValue

Function parseGitConfigValue

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

Source from the content-addressed store, hash-verified

18 * Finds the first matching key under the given section/subsection.
19 */
20export async function parseGitConfigValue(
21 gitDir: string,
22 section: string,
23 subsection: string | null,
24 key: string,
25): Promise<string | null> {
26 try {
27 const config = await readFile(join(gitDir, 'config'), 'utf-8')
28 return parseConfigString(config, section, subsection, key)
29 } catch {
30 return null
31 }
32}
33
34/**
35 * 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