Skip to content

feat(doctor): Add git identity fallback and improve output - #117

Merged
thomas-vilte merged 1 commit into
masterfrom
dev
Jul 30, 2026
Merged

thomas-vilte merged 1 commit into
masterfrom
dev

Conversation

@thomas-vilte

@thomas-vilte thomas-vilte commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Description

I implemented a fallback mechanism for the doctor command's Git identity checks. Previously, if git config user.name or user.email were not set, the doctor command would report an error. With this change, if matecommit has a GitFallback identity configured, the doctor command will now issue a warning instead of an error, indicating that the fallback identity will be used. This improves the user experience by providing more informative feedback and allowing matecommit to function even without a globally configured Git identity.

Fixes #

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

I added new unit tests in internal/commands/config/doctor_test.go to verify the behavior of checkGitUserName and checkGitUserEmail. These tests cover scenarios where:

  • Git user identity is unset and no fallback is configured (expected error).

  • Git user identity is unset but a matecommit fallback is configured (expected warning).

  • Git user identity is properly configured (expected OK status).

  • Unit tests

  • Integration tests

  • Manual test: (describe below)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Test Plan & Evidence

Suggested Manual Verification

  • Unit Tests: Run go test ./... and ensure all tests pass
  • No Regressions: Verify that related features still work as expected

@thomas-vilte thomas-vilte changed the title placeholder feat(doctor): Add git identity fallback and improve output Jul 30, 2026
@thomas-vilte thomas-vilte added feature New features test Testing, trials, and coverage labels Jul 30, 2026
@thomas-vilte
thomas-vilte merged commit 0e9cb2c into master Jul 30, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New features test Testing, trials, and coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant