diff --git a/grimoire_elk/enriched/git.py b/grimoire_elk/enriched/git.py index 0c3001fd1..a85a643d6 100644 --- a/grimoire_elk/enriched/git.py +++ b/grimoire_elk/enriched/git.py @@ -1027,12 +1027,13 @@ def add_commit_branches(self, git_repo, enrich_backend): :param git_repo: GitRepository object :param enrich_backend: the enrich backend """ - to_process = [] for hash, refname in git_repo._discover_refs(remote=True): if not refname.startswith('refs/heads/'): continue + # reset the counter + to_process = [] commit_count = 0 branch_name = refname.replace('refs/heads/', '') diff --git a/releases/unreleased/git-branches-study-fixed.yml b/releases/unreleased/git-branches-study-fixed.yml new file mode 100644 index 000000000..fe25d4aaa --- /dev/null +++ b/releases/unreleased/git-branches-study-fixed.yml @@ -0,0 +1,8 @@ +--- +title: Git branches study fixed +category: fixed +author: Jose Javier Merchante +issue: null +notes: > + Git branches study was assigning branches to wrong + commits.