Problem
git_log returns two different string shapes depending on whether start_timestamp/end_timestamp is passed, breaking downstream parsing.
Steps
- Run
mcp-server-git (v0.6.2) against any repo.
- Call
git_log with no timestamps.
- Call
git_log with start_timestamp='1 week ago'.
- Compare the two returned entries for the same commit.
Expected
Same output schema regardless of filter branch.
Actual
Unfiltered branch (src/git/src/mcp_server_git/server.py:191-197) uses !r, producing:
Commit: 'a1b2c3...'
Author: <git.Actor "Name <email>">
Message: 'subject\n\nbody\n'
Filtered branch (server.py:180-185) emits raw values via --format=%H%n%an%n%ad%n%s%n:
Commit: a1b2c3...
Author: Name
Message: subject
Also, filtered branch loses commit body entirely (%s = subject only) while unfiltered emits commit.message (subject + body).
Environment
- mcp-server-git 0.6.2 (
src/git/pyproject.toml)
- Python >=3.10, gitpython>=3.1.50
Thanks for maintaining modelcontextprotocol/servers!
Problem
git_logreturns two different string shapes depending on whetherstart_timestamp/end_timestampis passed, breaking downstream parsing.Steps
mcp-server-git(v0.6.2) against any repo.git_logwith no timestamps.git_logwithstart_timestamp='1 week ago'.Expected
Same output schema regardless of filter branch.
Actual
Unfiltered branch (
src/git/src/mcp_server_git/server.py:191-197) uses!r, producing:Filtered branch (
server.py:180-185) emits raw values via--format=%H%n%an%n%ad%n%s%n:Also, filtered branch loses commit body entirely (
%s= subject only) while unfiltered emitscommit.message(subject + body).Environment
src/git/pyproject.toml)Thanks for maintaining modelcontextprotocol/servers!