Skip to content

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

Merged
OCA-git-bot merged 1 commit into
OCA:18.0from
acsone:18.0-odoo_repository-gitpython-3.1.59-fix
Aug 19, 2026
Merged

[18.0][FIX] odoo_repository: GitPython 3.1.59 compatibility#158
OCA-git-bot merged 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.

@sebalix sebalix left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!
I'm not using anymore workaround_fs_errors option, but it was kind of required with mounted volumes on Azure. I would prefer to drop all of this workaround one day as it wasn't addressing all encountered issues anyway (like updating git remotes in existing repositories to compare commits between repositories). Better to keep it for now I guess.

Do you need it in your deployment?

@sebalix

sebalix commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Merging as it's blocking others PRs

/ocabot merge patch

@OCA-git-bot

Copy link
Copy Markdown
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 18.0-ocabot-merge-pr-158-by-sebalix-bump-patch, awaiting test results.

@OCA-git-bot
OCA-git-bot merged commit c199116 into OCA:18.0 Aug 19, 2026
7 checks passed
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at c814311. Thanks a lot for contributing to OCA. ❤️

@lmignon

lmignon commented Aug 19, 2026

Copy link
Copy Markdown
Author

Thank you! I'm not using anymore workaround_fs_errors option, but it was kind of required with mounted volumes on Azure. I would prefer to drop all of this workaround one day as it wasn't addressing all encountered issues anyway (like updating git remotes in existing repositories to compare commits between repositories). Better to keep it for now I guess.

Do you need it in your deployment?

Not at all... (at least AFAIK) but changes required to make the CI 💚 😏

@lmignon
lmignon deleted the 18.0-odoo_repository-gitpython-3.1.59-fix branch August 19, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants