Project

General

Profile

Actions

Feature #12853

open

Removing git branch result of database inconsistencies

Added by Daniel Dehennin over 11 years ago. Updated 6 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
SCM
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:

Description

Hello,

Following my comment on #1273, I unblocked a project by removing the git repository and re-adding it (which duplicates fixes :-/).

Now, that project is causing troubles again, the only thing I did is to delete a temporary branch.

The garbage collector of git removes commits not linking to a branch or tag, which seems to be the causes of inconsistencies in the database.

Branch deletion should be tracked to remove the commits from the database.

Regards.


Related issues

Has duplicate Redmine - Defect #15306: No database update on git history rewriteClosed

Actions
Has duplicate Redmine - Defect #22010: Git: Outdated Commits are not existing anymore, but are saved in Redmines cacheClosed

Actions
Actions #1

Updated by Daniel Dehennin about 11 years ago

The problem comes from the Repository.extra_info["heads"].

I'm using a solution from #1273:

sudo -u www-data ruby script/console production
>> repo = Repository.first(:conditions => {:project_id => Project.find('project_name').id})
>> repo.extra_info["heads"] = []
>> repo.save
>> repo.fetch_changesets
Actions #2

Updated by Toshi MARUYAMA over 10 years ago

  • Has duplicate Defect #15306: No database update on git history rewrite added
Actions #3

Updated by Toshi MARUYAMA about 8 years ago

  • Has duplicate Defect #22010: Git: Outdated Commits are not existing anymore, but are saved in Redmines cache added
Actions #4

Updated by Harald Welte 6 months ago

I can confirm this problem still exists: If a branch is removed from the git repo, the state gets broken and further indexing of te repo fails with errors like this:

App 189 output: fatal: bad object baf819411e93c8edce158c15f28eeb3b06dada13
App 189 output: E, [2023-11-07T17:26:41.220346 #189] ERROR -- : git log error: git exited with non-zero status: 128

Actions

Also available in: Atom PDF