-
-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
enhancementNew feature or requestNew feature or request
Description
What
Import git commits info for each module (sha, message, author, committer, dates, files changed...)
Why
- Get an accurate view of authors/committers, dates
- Ability to compare git commits from one branch to another for a given module (what is actually doing the integration of
oca-portinodoo_repository_migration, but it should be faster (PostgreSQL vs git log access), and allowing such comparisons for any migration paths on the fly (even backports).
How
There is jc that can parse git logs to get JSON:
$ git log --format=fuller --stat -- odoo_repository_migration | jc --git-log -p
[
{
"commit": "5e9c9c0977c665c9ce40c9dde029d1ce5af9c21c",
"author": "Sébastien Alix",
"author_email": "sebastien.alix@camptocamp.com",
"date": "Sat Jan 17 13:16:12 2026 +0100",
"commit_by": "Sébastien Alix",
"commit_by_email": "sebastien.alix@camptocamp.com",
"commit_by_date": "Sat Jan 17 13:28:43 2026 +0100",
"stats": {
"files_changed": 3,
"insertions": 3,
"deletions": 3,
"files": [
"odoo_repository_migration/README.rst",
"odoo_repository_migration/__manifest__.py",
"odoo_repository_migration/static/description/index.html"
]
},
"message": "Update all modules manifest and README with new repo info",
"epoch": 1768652172,
"epoch_utc": null
},
[...]
]Also available as a Python package:
>>> import jc
>>> cmd_output = subprocess.check_output(...)
>>> data = jc.parse('git_log', cmd_output)Questions
How much space it's about to take in DB? (not sure we need to store the diffs, but still).
cc @sebastienbeau maybe something you are interested in?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request