- Add tests for git_diff_unstaged, git_diff_staged, and git_diff
- Add tests for git_commit and git_reset operations
- Add tests for git_log with different parameters
- Add tests for git_create_branch with base branch support
- Add tests for git_show including initial commit edge case
- Achieve 100% test coverage of git server functions (12/12)
- All 23 tests pass with 0 errors
* bump: gitpython dependency from 3.1.43 to 3.1.45
* test: use default branch name instead of hardcoding 'master'
* fix: handle d.diff as string in GitPython 3.1.45+
Adds test coverage for the previously untested git_status function.
The test verifies that the function returns valid git status output
containing branch information.
This commit introduces the `git branch` tool to the MCP Git server, allowing users to list branches with various filtering options.
Changes include:
- Implemented `git_branch` function in `src/git/src/mcp_server_git/server.py` to support listing local, remote, and all branches, as well as filtering by `contains` and `not_contains` SHA values.
- Added comprehensive unit tests for the `git branch` functionality in `src/git/tests/test_server.py`, covering different branch types and commit filtering scenarios.
- Updated `src/git/README.md`.
The git server currently lacks branch switching capabilities, limiting both
LLMs and developers. This adds branch checkout so LLMs can
help developers add new functionality in a new feature branch.