Skip to main content

quote_config_parameter

Function quote_config_parameter 

Source
pub fn quote_config_parameter(value: &str) -> String
Expand description

What: Quote one key=value entry for Git’s GIT_CONFIG_PARAMETERS. Why: Git’s sq_quote_buf closes the quote around ' and !; the parser accepts that form in every supported version.

In TS you’d write (pseudocode):

quoteConfigParameter("user.name=O'Brien"); // "'user.name=O'\\''Brien'"