Skip to content

fix(output): use cformat! for GitError action strings - #1387

Merged
max-sixty merged 6 commits into
mainfrom
output-guideline-audit
Mar 9, 2026
Merged

max-sixty merged 6 commits into
mainfrom
output-guideline-audit

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Switches format! → cformat! in the Display impl for DetachedHead and
NotInWorktree, so action strings can include color-print styling tags. All
other GitError variants already use cformat! — these two were the only
holdouts.

Follow-up to #1380.

This was written by Claude Code on behalf of @max-sixty

max-sixty and others added 6 commits March 8, 2026 14:18
Replace single-quoted command/branch names with cformat! bold styling
in bail!/with_context error messages, per output guidelines.

Co-Authored-By: Claude <[email protected]>
Continue the quoted-name audit beyond src/commands/:
- output/global.rs: bold command name in exec error
- llm.rs: bold file path in template read error
- git/repository/worktrees.rs: remove quotes from @ in action strings

Co-Authored-By: Claude <[email protected]>
The cformat import is only used in the unix-only execute_command
function. Without the gate, Windows CI fails with unused-import error.

Co-Authored-By: Claude <[email protected]>
…trings

The Display impl for these two GitError variants used format!() for
action string interpolation, while all other variants used cformat!().
This inconsistency meant action strings couldn't include color-print
styling tags. Switching to cformat!() aligns them with the rest of the
error system (e.g., UncommittedChanges).

Co-Authored-By: Claude <[email protected]>
@max-sixty
max-sixty merged commit f08fb97 into main Mar 9, 2026
22 checks passed
@max-sixty
max-sixty deleted the output-guideline-audit branch March 9, 2026 00:48
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.

2 participants