Actions
Feature #12853
openRemoving git branch result of database inconsistencies
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
Updated by Daniel Dehennin over 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
Updated by Toshi MARUYAMA about 11 years ago
- Has duplicate Defect #15306: No database update on git history rewrite added
Updated by Toshi MARUYAMA almost 9 years ago
- Has duplicate Defect #22010: Git: Outdated Commits are not existing anymore, but are saved in Redmines cache added
Updated by Harald Welte about 1 year 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