You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Git's parse-options machinery accepts an unambiguous prefix of a long option. In the reference Git checkout, parse-options.c records abbreviated matches in parse_long_opt() and dispatches the abbreviated option when it is not ambiguous.
GitPython normalized unsafe option names before comparing them to the deny-list, but only exact canonical names were rejected. That allowed forms such as --upl=... to bypass the --upload-pack guard while still being interpreted by Git as the unsafe option.
Make the shared unsafe-option check reject non-empty canonical candidates that are prefixes of blocked canonical option names, while preserving exact-match behavior. Add coverage for the shared helper and for clone, fetch, pull, push, and ls-remote abbreviation forms.
Validation:
- .venv/bin/python -m compileall -q git/cmd.py test/test_git.py test/test_clone.py test/test_remote.py
- git diff --check
- Focused pytest/unittest execution could not run because the environment is missing pytest, ddt, and gitdb, and PyPI access failed while installing test-requirements.txt.
0 commit comments