Fix missing ObjectInserter.flush() in ReviewProjectAccess
Some JGit storage backends can't make objects available for reading until after the ObjectInserter's flush() method is invoked. This is already called by the commit() and commitAt() method path, but was missed in the createRef() path used by proposing a change to the access tab of a project. Also disable the reflog here, as the modification is probably going to a refs/changes/ namespace which does not bother with reflogs, as refs are only created and never moved. Change-Id: I769c1b98ab20c23eb496d644d8dcaebe5184e5c1
This commit is contained in:
@@ -254,6 +254,8 @@ public abstract class VersionedMetaData {
|
||||
RefUpdate ru = db.updateRef(refName);
|
||||
ru.setExpectedOldObjectId(ObjectId.zeroId());
|
||||
ru.setNewObjectId(src);
|
||||
ru.disableRefLog();
|
||||
inserter.flush();
|
||||
RefUpdate.Result result = ru.update();
|
||||
switch (result) {
|
||||
case NEW:
|
||||
|
||||
Reference in New Issue
Block a user