Skip to content

Sync it2git with main iTerm2 repo (add git line/file count vars) - #20

Open
tsvikas wants to merge 1 commit into
gnachman:mainfrom
tsvikas:sync-it2git
Open

Sync it2git with main iTerm2 repo (add git line/file count vars)#20
tsvikas wants to merge 1 commit into
gnachman:mainfrom
tsvikas:sync-it2git

Conversation

@tsvikas

@tsvikas tsvikas commented Jul 1, 2026

Copy link
Copy Markdown

What

Sync utilities/it2git with the canonical copy in the main iTerm2 repo (gnachman/iTerm2:OtherResources/Utilities/it2git).

This repo's it2git has drifted behind the main repo: it is missing the line-count and file-count reporting that the main copy already ships. The main copy is a strict superset, so this change is purely additive (no behavior is removed or altered).

Missing pieces this adds

  • line_counts() and file_counts() helper functions.
  • Five user vars set on every prompt (and cleared when not in a git repo):
    • gitLinesInserted, gitLinesDeleted
    • gitFilesAdded, gitFilesModified, gitFilesDeleted

These let status-bar / prompt components show per-status change counts, matching the behavior users get from a current iTerm2 install.

How I verified

Diffed both current HEADs. The only difference is the additions above; there are no mirror-only lines, so copying the main copy over this one loses nothing:

main   utilities/it2git: 190 lines
mirror utilities/it2git: 119 lines
diff: additions only (line_counts/file_counts + 5 gitFiles*/gitLines* vars)

Source: gnachman/iTerm2 @ e0417ffaf89c120ca3ba0e126b4d98c5e5e93ec6.

This repo's copy of it2git had drifted behind the canonical version in
gnachman/iTerm2 (OtherResources/Utilities/it2git). This brings it back in
line. The change is purely additive: it adds the line_counts() and
file_counts() helpers and sets five user vars (gitLinesInserted,
gitLinesDeleted, gitFilesAdded, gitFilesModified, gitFilesDeleted) that
the main repo already ships.

Source: gnachman/iTerm2 @ e0417ffaf89c120ca3ba0e126b4d98c5e5e93ec6

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@tsvikas
tsvikas marked this pull request as ready for review July 2, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant