Expand description
C-style path quoting compatible with Git’s quote.c / core.quotepath.
Git quotes pathnames for human-facing output (ls-files, diff --name-only,
ls-tree --name-only) using a byte lookup table and optional full octal
escaping for non-ASCII bytes when quote_path_fully is set (core.quotepath,
default true).
Functions§
- format_
diff_ path_ with_ prefix - Format one side of a
diff --git/---/+++line: eitherprefix/pathor"prefix<escaped-path>"when Git would C-quote the path (seet3300-funny-names). - quote_
c_ style - Quote
pathin Git C style when needed, matchingquote_c_style+core.quotepath. - quote_
path_ for_ tree_ listing - Quote for
ls-treedefault output: same asquote_c_style, but paths containing,are always wrapped in quotes (Gitquote_pathwithls_treemode).