Feature #12853

Removing git branch result of database inconsistencies

Added by Daniel Dehennin about 9 years ago. Updated almost 9 years ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

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

Duplicated by Redmine - Defect #15306: No database update on git history rewrite Closed
Duplicated by Redmine - Defect #22010: Git: Outdated Commits are not existing anymore, but are ... Closed

History

#1 Updated by Daniel Dehennin almost 9 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

#2 Updated by Toshi MARUYAMA about 8 years ago

  • Duplicated by Defect #15306: No database update on git history rewrite added

#3 Updated by Toshi MARUYAMA almost 6 years ago

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

Also available in: Atom PDF