Skip to content

Handle quoted Git paths in allowed dirty-path checks #201

Closed

Description

@codeforester

Problem

git_only_path_dirty parses git status --porcelain by taking everything after the first three characters. Git quotes paths containing spaces and other special characters, so a tracked change such as shared/hello world.txt is compared as a quoted Git representation instead of the caller's literal path.

As a result, git_update_repo can incorrectly skip an update even when all dirty files are inside the allowed path.

Scope

Replace the line-oriented status parsing with a Git-supported machine-readable format and compare decoded paths. Preserve correct handling for ordinary paths, rename/copy records, submodules, and changes in both the index and worktree.

Acceptance criteria

  • Allowed dirty paths containing spaces are recognized.
  • Quoted and special-character paths are compared literally.
  • Rename/copy records validate every relevant path.
  • Add focused BATS coverage for at least a path containing spaces and a rename.
  • Keep the existing refusal behavior for changes outside the allowed path.

Activity

  1. added this to the milestone on Jul 27, 2026
  2. self-assigned this
    on Jul 27, 2026
  3. moved this from Backlog to In Progress in base-bash-libson Jul 27, 2026
  4. moved this from In Progress to In Review in base-bash-libson Jul 27, 2026
  5. moved this from In Review to Done in base-bash-libson Jul 27, 2026
  6. modified the milestones: , v2.0.0 on Aug 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething is not working

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions