Whole team gets 'too many unreachable loose objects' messages

前端 未结 2 1054
猫巷女王i
猫巷女王i 2020-12-30 19:52

Not long ago, we have made the switch from SVN to Git.

A few days ago, I realized that all of our team gets those messages when they push :

$ git p         


        
2条回答
  •  一个人的身影
    2020-12-30 20:49

    This is followed by issue 14357 (GitLab 8.6- or less)

    The manual fix was:

    • SSH into worker1
    • cd into the gitlab-org/gitlab-ce directory
    • ran rm gc.log, this just contained the line " warning: There are too many unreachable loose objects; run 'git prune' to remove them."
    • ran git prune and prayed it didn't break things (which it thankfully didn't)

    But it looks like, starting GitLab 8.7, auto gc is disabled.
    This is also done in the context of (still opened) issue 13524:

    Typically after a rebase, amend or other action that requires a force push we can have dangled commits.

    Such "dereferenced" commits are getting lost due to git gc that may be executed internally or by using GitLab Housekeeping features.

    If it happens that there was a discussion attached to a specific commit - it is not available after dereferenced commit has been garbage-collected.

    Commits are being recorded in push events and are available through system notes added to merge request, and currently this produces error 500 in GitLab.

    Update: that issue was closed a month later (July 2016) with:

    • MR 5062: Don't garbage collect commits that have related DB records like comments

    Makes sure a commit is kept around when Git garbage collection runs.
    Git GC will delete commits from the repository that are no longer in any branches or tags, but we want to keep some of these commits around, for example if they have comments or CI builds.

    • MR 4101: Refactor: Convert existing array-based diff refs to the DiffRefs model

提交回复
热议问题