Merge branch 'stable-2.14'
* stable-2.14:
Changes can't be found when project name matches Change-Id pattern
EditScreen: Format with google-java-format
user-review-ui: Fix spelling
SearchSuggestOracle: Suggest "self" before other users
DeleteTag{s}IT: Add tests for deleting tag without refs/tags prefix
DeleteBranch{es}: Fix deletion of branch without refs/heads/ prefix
Change-Id: I6522baa4a48d678e3065ac31ecafe3b82547c9de
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
|
||||
package com.google.gerrit.server.project;
|
||||
|
||||
import static org.eclipse.jgit.lib.Constants.R_HEADS;
|
||||
|
||||
import com.google.gerrit.extensions.api.projects.DeleteBranchesInput;
|
||||
import com.google.gerrit.extensions.restapi.BadRequestException;
|
||||
import com.google.gerrit.extensions.restapi.Response;
|
||||
@@ -40,7 +42,7 @@ public class DeleteBranches implements RestModifyView<ProjectResource, DeleteBra
|
||||
if (input == null || input.branches == null || input.branches.isEmpty()) {
|
||||
throw new BadRequestException("branches must be specified");
|
||||
}
|
||||
deleteRefFactory.create(project).refs(input.branches).delete();
|
||||
deleteRefFactory.create(project).refs(input.branches).prefix(R_HEADS).delete();
|
||||
return Response.none();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user