Merge "Merge branch 'stable-2.12'"
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
|
||||
package com.google.gerrit.server.account;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.gerrit.audit.AuditService;
|
||||
import com.google.gerrit.common.TimeUtil;
|
||||
import com.google.gerrit.common.data.AccessSection;
|
||||
@@ -175,7 +176,7 @@ public class AccountManager {
|
||||
}
|
||||
|
||||
if (!realm.allowsEdit(Account.FieldName.FULL_NAME)
|
||||
&& who.getDisplayName() != null
|
||||
&& !Strings.isNullOrEmpty(who.getDisplayName())
|
||||
&& !eq(user.getAccount().getFullName(), who.getDisplayName())) {
|
||||
toUpdate = load(toUpdate, user.getAccountId(), db);
|
||||
toUpdate.setFullName(who.getDisplayName());
|
||||
|
||||
@@ -565,8 +565,10 @@ public class CommitValidators {
|
||||
IdentifiedUser user = refControl.getUser().asIdentifiedUser();
|
||||
|
||||
String refname = receiveEvent.refName;
|
||||
ObjectId old = receiveEvent.commit.getParent(0);
|
||||
|
||||
ObjectId old = ObjectId.zeroId();
|
||||
if (receiveEvent.commit.getParentCount() > 0) {
|
||||
old = receiveEvent.commit.getParent(0);
|
||||
}
|
||||
if (receiveEvent.command.getRefName().startsWith(REFS_CHANGES)) {
|
||||
/*
|
||||
* If the ref-update hook tries to distinguish behavior between pushes to
|
||||
|
||||
Reference in New Issue
Block a user