git-porcelain-parsing

Community

Reliable parsing of git status porcelain

AuthorAlex1980Alex
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Parsing git status --porcelain output to reliably extract file paths and their index/work tree statuses, including tricky edge cases such as leading dots, spaces, quoted paths, and non-ASCII characters. It documents how to avoid common pitfalls (e.g., the line[2:] vs line[3:] issue) and ensures compatibility across platforms by using per-command core.quotepath=false to preserve Cyrillic paths.

Core Features & Use Cases

  • Accurate extraction of file paths from porcelain lines for both staged and unstaged changes, including renamed paths (e.g., R old -> new) and untracked files.
  • Robust handling of quotes and unicode in paths, with Windows path normalization (backslashes to slashes).
  • Guidance for integrating the parser into audits, CI checks, pre-commit hooks, and automation pipelines that rely on precise change data.

Quick Start

Run the parser against a repository root to obtain a structured representation of changed files.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: git-porcelain-parsing
Download link: https://github.com/Alex1980Alex/1C-Enterprise_Framework/archive/main.zip#git-porcelain-parsing

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.