From 629a6c861a174b71e63e621bdb6e828116eccfeb Mon Sep 17 00:00:00 2001 From: jawwad-ali Date: Mon, 29 Jun 2026 21:04:26 +0500 Subject: [PATCH 1/2] fix(scripts): use ASCII [OK] marker in initialize-repo.sh (parity with PowerShell twin) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- extensions/git/scripts/bash/initialize-repo.sh | 2 +- tests/extensions/git/test_git_extension.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/extensions/git/scripts/bash/initialize-repo.sh b/extensions/git/scripts/bash/initialize-repo.sh index 296e363b94..c10876efc6 100755 --- a/extensions/git/scripts/bash/initialize-repo.sh +++ b/extensions/git/scripts/bash/initialize-repo.sh @@ -51,4 +51,4 @@ _git_out=$(git init -q 2>&1) || { echo "[specify] Error: git init failed: $_git_ _git_out=$(git add . 2>&1) || { echo "[specify] Error: git add failed: $_git_out" >&2; exit 1; } _git_out=$(git commit --allow-empty -q -m "$COMMIT_MSG" 2>&1) || { echo "[specify] Error: git commit failed: $_git_out" >&2; exit 1; } -echo "✓ Git repository initialized" >&2 +echo "[OK] Git repository initialized" >&2 diff --git a/tests/extensions/git/test_git_extension.py b/tests/extensions/git/test_git_extension.py index 2017dae627..0c175f2ff0 100644 --- a/tests/extensions/git/test_git_extension.py +++ b/tests/extensions/git/test_git_extension.py @@ -233,6 +233,10 @@ def test_initializes_git_repo(self, tmp_path: Path): result = _run_bash("initialize-repo.sh", project) assert result.returncode == 0, result.stderr + # Success marker is ASCII "[OK]" (matching the PowerShell twin and the + # sibling auto-commit scripts), not a Unicode checkmark. + assert "[OK]" in result.stderr + # Verify git repo exists assert (project / ".git").exists() From aa602e6ebdffcaa1217ed5a7126c428f6b9c5bbd Mon Sep 17 00:00:00 2001 From: jawwad-ali Date: Mon, 29 Jun 2026 22:16:26 +0500 Subject: [PATCH 2/2] test: assert full [OK] init line and surface stderr on failure 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) --- tests/extensions/git/test_git_extension.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/extensions/git/test_git_extension.py b/tests/extensions/git/test_git_extension.py index 0c175f2ff0..4555310655 100644 --- a/tests/extensions/git/test_git_extension.py +++ b/tests/extensions/git/test_git_extension.py @@ -233,9 +233,9 @@ def test_initializes_git_repo(self, tmp_path: Path): result = _run_bash("initialize-repo.sh", project) assert result.returncode == 0, result.stderr - # Success marker is ASCII "[OK]" (matching the PowerShell twin and the - # sibling auto-commit scripts), not a Unicode checkmark. - assert "[OK]" in result.stderr + # Success marker is the full ASCII "[OK] ..." line (matching the PowerShell + # twin and the sibling auto-commit scripts), not a Unicode checkmark. + assert "[OK] Git repository initialized" in result.stderr, result.stderr # Verify git repo exists assert (project / ".git").exists()