mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-07 14:05:44 +01:00
Implement peer review comments
This commit is contained in:
@@ -79,11 +79,8 @@ public class GitBranchCommand extends AbstractGitCommand implements BranchComman
|
||||
private void handlePushError(RemoteRefUpdate remoteRefUpdate, BranchRequest request, Repository repository) {
|
||||
if (remoteRefUpdate.getStatus() != RemoteRefUpdate.Status.OK) {
|
||||
// TODO handle failed remote update
|
||||
throw new RuntimeException(
|
||||
String.format("Could not pull new branch '%s' into central repository '%s': %s",
|
||||
request.getNewBranch(),
|
||||
repository.getNamespaceAndName(),
|
||||
remoteRefUpdate.getMessage()));
|
||||
throw new IntegrateChangesFromWorkdirException(repository,
|
||||
String.format("Could not push new branch '%s' into central repository", request.getNewBranch()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,8 +47,6 @@ public class GitMergeCommand extends AbstractGitCommand implements MergeCommand
|
||||
|
||||
@Override
|
||||
public MergeCommandResult merge(MergeCommandRequest request) {
|
||||
RepositoryPermissions.push(context.getRepository().getId()).check();
|
||||
|
||||
try (WorkingCopy<Repository> workingCopy = workdirFactory.createWorkingCopy(context)) {
|
||||
Repository repository = workingCopy.getWorkingRepository();
|
||||
logger.debug("cloned repository to folder {}", repository.getWorkTree());
|
||||
|
||||
Reference in New Issue
Block a user