Fix ref state for starred changes to be in All-Users
This was a bug in I622dbbb3, which accidentally referenced the starred change ref in the project repo. Add tests that hopefully should make this kind of thing easier to spot. Change-Id: If908c6ea7bbe99be113b6b0c87b5be311ed7547c
This commit is contained in:
@@ -971,7 +971,7 @@ public class ChangeField {
|
||||
input.editRefs().values().forEach(
|
||||
r -> result.add(RefState.of(r).toByteArray(project)));
|
||||
input.starRefs().values().forEach(
|
||||
r -> result.add(RefState.of(r.ref()).toByteArray(project)));
|
||||
r -> result.add(RefState.of(r.ref()).toByteArray(args.allUsers)));
|
||||
|
||||
if (PrimaryStorage.of(input.change()) == PrimaryStorage.NOTE_DB) {
|
||||
ChangeNotes notes = input.notes();
|
||||
|
||||
@@ -62,7 +62,7 @@ public class StalenessChecker {
|
||||
private static final Logger log =
|
||||
LoggerFactory.getLogger(StalenessChecker.class);
|
||||
|
||||
private final ImmutableSet<String> FIELDS = ImmutableSet.of(
|
||||
public static final ImmutableSet<String> FIELDS = ImmutableSet.of(
|
||||
ChangeField.CHANGE.getName(),
|
||||
ChangeField.REF_STATE.getName(),
|
||||
ChangeField.REF_STATE_PATTERN.getName());
|
||||
|
||||
Reference in New Issue
Block a user