Skip to main content

quote_git_config_value

Function quote_git_config_value 

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

What: Quotes one value under Git’s config syntax. Why: The value is always double-quoted, so ;, # and surrounding whitespace stay literal; backslash, double quote, newline and tab use Git’s escapes.

In TS you’d write (pseudocode):

quoteGitConfigValue('/a "b"'); // '"/a \\"b\\""'