dfca2c86f502756ad5c2fd68ada0d9452b2b9c8b
When the 'All-Projects' project is created during the schema initialization, HEAD is set to point to the refs/meta/config branch. When HEAD is updated an entry into the reflog is written. The problem is that after the 'All-Projects' project is created, first HEAD is updated and only afterwards the initial commit for refs/meta/config is done. This means at the point in time when HEAD is updated refs/meta/config does not exist yet. As result the reflog for HEAD will track an update from 0000000000000000000000000000000000000000 to 0000000000000000000000000000000000000000. Instead it is expected that the ID of the initial commit is used as target in the reflog. This is fixed by changing the order of the steps. After the 'All-Projects' project is created we now first create the initial commit for refs/meta/config and only afterwards update HEAD. The 0000000000000000000000000000000000000000 as target in the reflog is a problem when running the jgit gc on this repository. At the moment jgit gc cannot handle this situation and as result the repository gets corrupted. It is not enough that the reflog entry is now correctly written since this only helps for newly initialized sites. Sites which have been initialized before may still have the incorrect reflog entry. This means jgit should be fixed so that it can handle this situation (native git can). Alternatively we could write a migration that fixes the incorrect reflog entry, but it's probably easier if jgit could just handle this. Change-Id: I55b5a7c3a6bf7b9194e2ba64c6a78e39d3ef056c Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Description
RETIRED, Gerrit as used by OpenStack