Skip to content

Improve error context for git command helpers#37

Merged
bakayu merged 1 commit intogitxtui:masterfrom
Phoenix2066:improve-git-error-context
Feb 15, 2026
Merged

Improve error context for git command helpers#37
bakayu merged 1 commit intogitxtui:masterfrom
Phoenix2066:improve-git-error-context

Conversation

@Phoenix2066
Copy link
Contributor

Summary

This PR improves error messages returned by git command helper methods by
adding contextual wrapping while preserving the original error.

What changed

  • Standardized error handling across git command methods
  • Wrapped command execution errors with descriptive context using %w
  • No changes to command behavior or return values

Why

Previously, many failures surfaced as generic errors (e.g. exit status 128),
which made it difficult to identify which git operation failed.
Adding context improves debuggability without impacting callers.

Scope & compatibility

  • No API changes
  • No behavior changes
  • Existing callers continue to work unchanged

@bakayu
Copy link
Member

bakayu commented Feb 11, 2026

Hey, thank you for the PR!
I am a little busy right now, will review this on the weekend.

@bakayu
Copy link
Member

bakayu commented Feb 15, 2026

Thank you for the contribution!

PS: Your commit was not signed, but I will let this slide as this is a first time contribution.
Make sure to sign all your commits, it is good practice. Thanks.

@bakayu bakayu merged commit 9fb9e70 into gitxtui:master Feb 15, 2026
2 checks passed
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