Table of Contents

Class GitConfigFileHelper

Namespace
SunamoGitConfig
Assembly
SunamoGitConfig.dll

Helper class for working with Git configuration files

public class GitConfigFileHelper : BlockNames
Inheritance
GitConfigFileHelper
Inherited Members
Extension Methods

Methods

Format(string)

Formats Git configuration content by ensuring proper indentation

public static string Format(string content)

Parameters

content string

The Git configuration content to format

Returns

string

Formatted Git configuration content

Load(string)

Loads and parses a Git configuration file

public static ExistsNonExistsListGitConfig Load(string path)

Parameters

path string

The path to the Git configuration file

Returns

ExistsNonExistsListGitConfig

Parsed Git configuration data

Parse(string)

Parses Git configuration file content

public static ExistsNonExistsListGitConfig Parse(string content)

Parameters

content string

The content of the Git configuration file

Returns

ExistsNonExistsListGitConfig

Parsed Git configuration data with existing and non-existing sections

ParseBlocks(string)

Parses and returns only the block headers from Git configuration content

public static List<string> ParseBlocks(string text)

Parameters

text string

The Git configuration file content

Returns

List<string>

List of block header lines (lines starting with '[')

Save(string, ExistsNonExistsListGitConfig)

Saves Git configuration data to a file

public static void Save(string path, ExistsNonExistsListGitConfig config)

Parameters

path string

The file path where to save the configuration

config ExistsNonExistsListGitConfig

The Git configuration data to save