mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-12-21 15:59:48 +01:00
Mind review findings
This commit is contained in:
@@ -31,6 +31,7 @@ import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* @author Sebastian Sdorra
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public class GitImportHandler extends AbstactImportHandler {
|
||||
|
||||
@@ -43,7 +43,6 @@ import org.slf4j.LoggerFactory;
|
||||
import sonia.scm.ContextEntry;
|
||||
import sonia.scm.repository.GitRepositoryHandler;
|
||||
import sonia.scm.repository.GitUtil;
|
||||
import sonia.scm.repository.InternalRepositoryException;
|
||||
import sonia.scm.repository.Repository;
|
||||
import sonia.scm.repository.api.ImportFailedException;
|
||||
import sonia.scm.repository.api.PullResponse;
|
||||
@@ -217,15 +216,11 @@ public class GitPullCommand extends AbstractGitPushOrPullCommand
|
||||
response = convert(git, result);
|
||||
} catch
|
||||
(GitAPIException ex) {
|
||||
if (ex.getMessage().contains("not authorized")) {
|
||||
throw new ImportFailedException(
|
||||
ContextEntry.ContextBuilder.entity(repository).build(),
|
||||
"Repository import failed. The credentials are wrong or missing.",
|
||||
ex
|
||||
);
|
||||
}
|
||||
|
||||
throw new InternalRepositoryException(repository, "error during pull", ex);
|
||||
throw new ImportFailedException(
|
||||
ContextEntry.ContextBuilder.entity(repository).build(),
|
||||
"Repository import failed. The credentials are wrong or missing.",
|
||||
ex
|
||||
);
|
||||
}
|
||||
|
||||
return response;
|
||||
|
||||
Reference in New Issue
Block a user