Make Branch.NameKey enforce full ref names
Also remove some now redundant ref fixes before constructing Branch.NameKeys. This reduces the proliferation of "correcting" code. Change-Id: I5d9864d7c6ea7252f05a4ccabcf124cb014c4fae
This commit is contained in:
committed by
David Pursehouse
parent
c16ab0df0d
commit
4ddbfc9a8b
@@ -57,8 +57,7 @@ public class ChangeIdHandler extends OptionHandler<Change.Id> {
|
||||
try {
|
||||
final Change.Key key = Change.Key.parse(tokens[2]);
|
||||
final Project.NameKey project = new Project.NameKey(tokens[0]);
|
||||
final Branch.NameKey branch =
|
||||
new Branch.NameKey(project, "refs/heads/" + tokens[1]);
|
||||
final Branch.NameKey branch = new Branch.NameKey(project, tokens[1]);
|
||||
for (final ChangeData cd : queryProvider.get().byBranchKey(branch, key)) {
|
||||
setter.addValue(cd.getId());
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user