Project

General

Profile

Actions

Feature #12853

open

Removing git branch result of database inconsistencies

Feature #12853: Removing git branch result of database inconsistencies

Added by Daniel Dehennin almost 14 years ago. Updated about 3 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
SCM
Target version:
-
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 2 (0 open — 2 closed)

Has duplicate Redmine - Defect #15306: No database update on git history rewriteClosedActions
Has duplicate Redmine - Defect #22010: Git: Outdated Commits are not existing anymore, but are saved in Redmines cacheClosedActions

Updated by Daniel Dehennin over 13 years ago Actions #1

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 13 years ago Actions #2

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

Updated by Toshi MARUYAMA almost 11 years ago Actions #3

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

Updated by Harald Welte about 3 years ago Actions #4

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: PDF Atom