Relative path include in .gitconfig throws AssertionError · Issue #2103 · gitpython-developers/GitPython
Repository navigation
Relative path include in .gitconfig throws AssertionError #2103
New issue
New issue
Closed
#2169
Closed
Relative path include in .gitconfig throws AssertionError #2103 #2169 Labels
acknowledged
Description
@Virtlink's profile Virtlink opened on Feb 24, 2026My .gitconfig contains:
[include]
path = .gitconfig_common
According to the Git documentation , this is allowed to be a relative path :
If the value of the variable is a relative path, the path is considered to be relative to the configuration file in which the include directive was found.
However, GitPython throws:
File "/Users/daniel/.cache/uv/archive-v0/YvUvYFO1C0vkI8VZmPICW/lib/python3.12/site-packages/briefcase/commands/base.py", line 1365, in get_git_config_value
if git_config.has_option(section, option):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/daniel/.cache/uv/archive-v0/YvUvYFO1C0vkI8VZmPICW/lib/python3.12/site-packages/git/config.py", line 113, in assure_data_present
self.read()
File "/Users/daniel/.cache/uv/archive-v0/YvUvYFO1C0vkI8VZmPICW/lib/python3.12/site-packages/git/config.py", line 654, in read
assert osp.isabs(file_path), "Need absolute paths to be sure our cycle checks will work"
^^^^^^^^^^^^^^^^^^^^
AssertionError: Need absolute paths to be sure our cycle checks will work
The workaround is to modify my .gitconfig and make the path absolute, but I'd like it to work without modifying my .gitconfig to suit GitPython.
Metadata
Metadata
Assignees
No one assignedLabels
acknowledged