fix: reject unsafe output options in Commit.count · gitpython-developers/GitPython@38553b6 · GitHub
Skip to content

Commit 38553b6

Browse files
Byroncodex
andcommitted
fix: reject unsafe output options in Commit.count
<!-- agent --> Commit.count forwards keyword arguments to git rev-list but did not apply the unsafe-option validation used by the sibling revision APIs. Validate forwarded options with the existing Git.check_unsafe_options helper and retain the explicit allow_unsafe_options escape hatch. This covers GHSA-p538-c434-8v24 without adding another option parser. Git baseline: git.git a23bace963 defines --output as a shared diff option consumed by setup_revisions; t/t6000-rev-list-misc.sh exercises that option with rev-list. Co-authored-by: GPT 5.6 <codex@openai.com>
1 parent be5031d commit 38553b6

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

git/objects/commit.py

Lines changed: 14 additions & 1 deletion

test/test_commit.py

Lines changed: 5 additions & 0 deletions

0 commit comments

Comments
 (0)