Skip to content

[18.0][FIX] odoo_repository: GitPython 3.1.59 compatibility - #158

Open
lmignon wants to merge 1 commit into
OCA:18.0from
acsone:18.0-odoo_repository-gitpython-3.1.59-fix
Open

[18.0][FIX] odoo_repository: GitPython 3.1.59 compatibility#158
lmignon wants to merge 1 commit into
OCA:18.0from
acsone:18.0-odoo_repository-gitpython-3.1.59-fix

Conversation

@lmignon

@lmignon lmignon commented Aug 13, 2026

Copy link
Copy Markdown

GitPython 3.1.59, released on 2026-08-10, added '--separate-git-dir' to the list of unsafe options.

Allow unsafe options on clone created with workaround_fs_errors=True since they are the only once using this option.

Without this fix tests for `workaround_fs_error=Truer fails

[7](https://github.com/OCA/module-composition-analysis/actions/runs/31675398000/job/94368767381?pr=157#step:8:328)
2026-08-13 06:52:41,227 312 ERROR odoo odoo.addons.odoo_repository.tests.test_repository_scanner: ERROR: TestRepositoryScanner.test_workaround_fs_errors
Traceback (most recent call last):
  File "/__w/module-composition-analysis/module-composition-analysis/odoo_repository/tests/test_repository_scanner.py", line 215, in test_workaround_fs_errors
    scanner.sync()
  File "/__w/module-composition-analysis/module-composition-analysis/odoo_repository/lib/scanner.py", line 108, in sync
    res = self._clone()
  File "/__w/module-composition-analysis/module-composition-analysis/odoo_repository/lib/scanner.py", line 252, in _clone
    git.Repo.clone_from(**params)
  File "/opt/odoo-venv/lib/python3.10/site-packages/git/repo/base.py", line 1676, in clone_from
    return cls._clone(
  File "/opt/odoo-venv/lib/python3.10/site-packages/git/repo/base.py", line 1515, in _clone
    Git.check_unsafe_options(
  File "/opt/odoo-venv/lib/python3.10/site-packages/git/cmd.py", line 1025, in check_unsafe_options
    raise UnsafeOptionError(f"{unsafe_option} is not allowed, use `allow_unsafe_options=True` to allow it.")
git.exc.UnsafeOptionError: --separate-git-dir is not allowed, use `allow_unsafe_options=True` to allow it.

GitPython 3.1.59, released on 2026-08-10, added '--separate-git-dir' to
the list of unsafe options.

Allow unsafe options on clone created with workaround_fs_errors=True
since they are the only once using this option.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants