Go to file
Edwin Kempin dfca2c86f5 Write valid reflog for HEAD when creating the 'All-Projects' project
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>
2013-03-18 11:31:26 +01:00
2012-10-18 13:38:51 +02:00
2008-11-14 16:59:34 -08:00
2009-03-27 20:20:10 -07:00
Description
RETIRED, Gerrit as used by OpenStack
120 MiB