Git Processor

February 20, 2026 ยท View on GitHub

File: src/processors/git.py | Priority: 20 | Name: git

Handles all common git subcommands, including those with global options (-C, --no-pager, -c, --git-dir, --work-tree).

Supported Commands

CommandStrategy
git statusCondensed: branch info, counters by type (M, A, D, R, C, ?), files grouped by directory. More than 8 files in a directory: collapsed with breakdown. Handles long-format and short-format status, merge conflicts (UU, AA, DD, AU, UA, DU, UD), and HEAD detached
git diffPreserves all filenames, hunk headers, and change lines (+/-). Strips index and ---/+++ headers. Reduces context lines to 3 before/after each change. Truncates hunks beyond 150 lines
git diff --statStrips visual bars (+++---), keeps filenames and change counts
git diff --name-onlyGroups by directory when > 20 files
git diff --name-statusGroups by directory when > 20 files
git logCompact one-line format (hash message), max 20 entries. Detects --graph format and preserves ASCII art structure
git showCompact header (strips Author/Date/Merge) + compressed diff
git push/pull/fetch/cloneStrips progress bars and counters, keeps only the result
git branchIf > 30 branches: current branch + first 5 + counter
git stash listTruncates beyond 10 entries
git reflogTruncates beyond 20 entries
git blameGroups by author with line counts and percentages, shows last 10 lines for context. Short files (< 20 lines) pass through
git cherry-pick/rebase/mergeStrips progress (counting/compressing objects), keeps result

Configuration

ParameterDefaultDescription
max_diff_hunk_lines150Max lines per hunk in git diff
max_diff_context_lines3Context lines kept before/after each change
max_log_entries20Max entries in git log/reflog
git_branch_threshold30Branches before compaction
git_stash_threshold10Stash entries before truncation

Example

Before (git status):

On branch feature/auth
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
	modified:   src/auth.py
	modified:   src/models.py

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	src/new_handler.py
	tests/test_auth_new.py

no changes added to commit

After:

On branch feature/auth | no changes added to commit
Files: 4 (?:2, M:2)
  src/M auth.py
  src/M models.py
  src/? new_handler.py
  tests/? test_auth_new.py