Skip to main content

parse_git_status_paths

Function parse_git_status_paths 

Source
pub fn parse_git_status_paths(snapshot: &str) -> Vec<String>
Expand description

Extract repo-relative paths from a porcelain v1-style status snapshot.

The returned paths are suitable for carry-forward/prompt context and are intentionally resilient to common porcelain edge cases:

  • rename/copy lines in the form old -> new (returns new)
  • quoted paths (returns the unquoted path)

This parser is used for residual-file detection and must be robust: incorrect path extraction can pollute carry-forward state.