Skip to content

fix(scripts): use ASCII [OK] marker in initialize-repo.sh (parity with PowerShell twin)#3231

Merged
mnriem merged 2 commits into
github:mainfrom
jawwad-ali:fix/initialize-repo-ascii-ok-marker
Jun 29, 2026
Merged

fix(scripts): use ASCII [OK] marker in initialize-repo.sh (parity with PowerShell twin)#3231
mnriem merged 2 commits into
github:mainfrom
jawwad-ali:fix/initialize-repo-ascii-ok-marker

Conversation

@jawwad-ali

Copy link
Copy Markdown
Contributor

Description

initialize-repo.sh printed its success line with a Unicode checkmark:

echo "✓ Git repository initialized" >&2

But its PowerShell twin and the sibling extension scripts all use the ASCII marker [OK]:

  • initialize-repo.ps1: Write-Host "[OK] Git repository initialized"
  • auto-commit.sh: echo "[OK] Changes committed ..."
  • auto-commit.ps1: Write-Host "[OK] Changes committed ..."

So initialize-repo.sh is the lone outlier — an output-text divergence across the bash/PowerShell twins and an inconsistency among sibling extension scripts (the Unicode marker can also render as a mojibake box in consoles that aren't UTF-8).

Fix

Use [OK] to match the twin and siblings. One-line change.

Testing

  • uvx ruff check clean.
  • Extended TestInitializeRepoBash::test_initializes_git_repo to assert the success marker [OK] is present on stderr.
  • The existing initialize-repo tests (git repo created, commit present, custom message) are unaffected.

AI Disclosure

  • I did use AI assistance (describe below)

Found and fixed with Claude Code (Claude Opus 4.8) under my direction. AI located the lone Unicode marker among the otherwise-ASCII sibling/twin scripts; I confirmed the twin and auto-commit scripts use [OK] and that no test depended on the checkmark, and reviewed the diff before submitting.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aligns the Git extension’s Bash initialize-repo.sh success output with the ASCII [OK] marker used by the PowerShell twin and other sibling scripts, and updates the Bash test to assert the new marker.

Changes:

  • Replace the Unicode checkmark success marker in initialize-repo.sh with [OK].
  • Extend the Bash initialize-repo test to assert the [OK] success marker is present on stderr.
Show a summary per file
File Description
extensions/git/scripts/bash/initialize-repo.sh Changes the success message marker from a Unicode checkmark to ASCII [OK] for consistency and safer console rendering.
tests/extensions/git/test_git_extension.py Adds an assertion that the Bash script emits the [OK] marker on successful initialization.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Low

Comment thread tests/extensions/git/test_git_extension.py Outdated
jawwad-ali and others added 2 commits June 29, 2026 22:15
…h PowerShell twin)

initialize-repo.sh printed its success line with a Unicode checkmark ('✓ Git repository initialized'), while the PowerShell twin initialize-repo.ps1 and both auto-commit scripts use the ASCII marker '[OK]'. That is an output-text divergence across the bash/PowerShell twins and an inconsistency among sibling extension scripts. Use '[OK]' to match.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Address Copilot review: assert the full success line '[OK] Git repository initialized' (not just the '[OK]' substring, which could pass if unrelated [OK] output is added later) and include result.stderr in the assertion message so a failure is debuggable.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jawwad-ali jawwad-ali force-pushed the fix/initialize-repo-ascii-ok-marker branch from d0d4f16 to aa602e6 Compare June 29, 2026 17:16
@mnriem mnriem requested a review from Copilot June 29, 2026 20:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Low

@mnriem mnriem merged commit 4badf3b into github:main Jun 29, 2026
12 checks passed
@mnriem

mnriem commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Thank you!

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.

3 participants