Merge branch 'stable-2.14'
* stable-2.14: ReceiveCommits: parseBody before getFooterLines Remove reference to non-existing account_ssh_keys table from docs DeleteRef: Pass project name into validateRefOperation Be more consistent about object ids used in ref operation validation Be more consistent about object ids used in ref operation validation Change-Id: I5e532f5d2af6a589751e63fa21872df28568e4d8
This commit is contained in:
commit
a96fdf27da
@ -819,10 +819,6 @@ can match against them during authentication. The unit of storage
|
||||
is per-user, so 1024 items translates to 1024 unique user accounts.
|
||||
As each individual user account may configure multiple SSH keys,
|
||||
the total number of keys may be larger than the item count.
|
||||
+
|
||||
This cache is based off the `account_ssh_keys` table and the
|
||||
`accounts.ssh_user_name` column in the database. If either is
|
||||
modified directly, this cache should be flushed.
|
||||
|
||||
cache `"web_sessions"`::
|
||||
+
|
||||
|
@ -1768,6 +1768,7 @@ public class ReceiveCommits {
|
||||
break;
|
||||
}
|
||||
total++;
|
||||
rp.getRevWalk().parseBody(c);
|
||||
String name = c.name();
|
||||
groupCollector.visit(c);
|
||||
Collection<Ref> existingRefs = existing.get(c);
|
||||
|
@ -39,7 +39,7 @@ public class RefOperationValidators {
|
||||
|
||||
public static ReceiveCommand getCommand(RefUpdate update, ReceiveCommand.Type type) {
|
||||
return new ReceiveCommand(
|
||||
update.getOldObjectId(), update.getNewObjectId(), update.getName(), type);
|
||||
update.getExpectedOldObjectId(), update.getNewObjectId(), update.getName(), type);
|
||||
}
|
||||
|
||||
private final RefReceivedEvent event;
|
||||
|
@ -115,8 +115,10 @@ public class DeleteRef {
|
||||
}
|
||||
RefUpdate.Result result;
|
||||
RefUpdate u = r.updateRef(ref);
|
||||
u.setExpectedOldObjectId(r.exactRef(ref).getObjectId());
|
||||
u.setNewObjectId(ObjectId.zeroId());
|
||||
u.setForceUpdate(true);
|
||||
refDeletionValidator.validateRefOperation(ref, identifiedUser.get(), u);
|
||||
refDeletionValidator.validateRefOperation(resource.getName(), identifiedUser.get(), u);
|
||||
int remainingLockFailureCalls = MAX_LOCK_FAILURE_CALLS;
|
||||
for (; ; ) {
|
||||
try {
|
||||
@ -222,6 +224,8 @@ public class DeleteRef {
|
||||
|
||||
RefUpdate u = r.updateRef(refName);
|
||||
u.setForceUpdate(true);
|
||||
u.setExpectedOldObjectId(r.exactRef(refName).getObjectId());
|
||||
u.setNewObjectId(ObjectId.zeroId());
|
||||
refDeletionValidator.validateRefOperation(project.getName(), identifiedUser.get(), u);
|
||||
return command;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user