Commit Graph

8 Commits

Author SHA1 Message Date
João M. Martins
1b5f64e7e4 Fix test_git_diff to use dynamic branch name 2025-12-10 10:11:46 +11:00
UmakanthKaspa
2f93d3c717 Add comprehensive tests for git server functions (#2970)
- 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
2025-11-25 21:43:09 +00:00
Christoph Blecker
99813ce5c9 Update gitpython library for git mcp server (#2948)
* 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+
2025-11-25 20:35:33 +00:00
UmakanthKaspa
4225ab46e1 Add test for git_status function
Adds test coverage for the previously untested git_status function.
  The test verifies that the function returns valid git status output
  containing branch information.
2025-11-06 16:58:07 +00:00
Taj Baba
a67e3b0a92 fix: mcp_server_git: correct add logic for ["."] (#2379) 2025-08-11 12:09:26 +01:00
JavieHush
e4d856214b feat: Add git branch functionality and unit tests
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`.
2025-05-28 16:18:42 +08:00
Mike Gehard
98e78c37b4 Use a test fixture to set proper patterns. 2024-12-08 16:26:59 -05:00
Mike Gehard
021a95c904 Allow to check out branches
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.
2024-12-08 16:26:58 -05:00