Method: Git::Lib#unescape_quoted_path
- Defined in:
- lib/git/lib.rb
#unescape_quoted_path(path) ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Unescape a path if it is quoted
Git commands that output paths (e.g. ls-files, diff), will escape unusual characters.
1002 1003 1004 1005 1006 1007 1008 |
# File 'lib/git/lib.rb', line 1002 def unescape_quoted_path(path) if path.start_with?('"') && path.end_with?('"') Git::EscapedPath.new(path[1..-2]).unescape else path end end |