Skip to content

refactor: consolidate _log_git_stderr_errors into models/_git_utils.py#409

Merged
tschm merged 4 commits intomainfrom
copilot/remove-duplicate-log-git-stderr-errors
Mar 8, 2026
Merged

refactor: consolidate _log_git_stderr_errors into models/_git_utils.py#409
tschm merged 4 commits intomainfrom
copilot/remove-duplicate-log-git-stderr-errors

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 8, 2026

_log_git_stderr_errors lived in subprocess_utils.py rather than models/_git_utils.py, the established home for git helpers. This scattered git utilities across two modules.

Changes

  • models/_git_utils.py — added _log_git_stderr_errors (with loguru import)
  • models/template.py — merged imports: from rhiza.models._git_utils import _log_git_stderr_errors, _normalize_to_list
  • commands/_sync_helpers.py — updated import source from subprocess_utilsmodels._git_utils
  • tests/test_commands/test_sync.py — updated import and mock patch target to rhiza.models._git_utils.logger
  • subprocess_utils.py — deleted (now empty)
Original prompt

This section details on the original issue you should resolve

<issue_title>Duplication</issue_title>
<issue_description>2. 🔁 Deduplicate _log_git_stderr_errors

Files: src/rhiza/models/_git_utils.py and src/rhiza/commands/_sync_helpers.py

_log_git_stderr_errors is defined in both models/_git_utils.py and commands/_sync_helpers.py. Remove the copy in _sync_helpers.py and import it from rhiza.models._git_utils (or rhiza.models) — which is already the canonical home for git helpers.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@tschm tschm marked this pull request as ready for review March 8, 2026 09:39
…cal home)

Co-authored-by: tschm <2046079+tschm@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove duplicate log_git_stderr_errors from sync_helpers.py refactor: consolidate _log_git_stderr_errors into models/_git_utils.py Mar 8, 2026
Copilot finished work on behalf of tschm March 8, 2026 09:41
@tschm tschm merged commit 8c515ce into main Mar 8, 2026
15 checks passed
@tschm tschm deleted the copilot/remove-duplicate-log-git-stderr-errors branch March 8, 2026 09:42
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.

Duplication

2 participants