James Moger
2014-04-17 f8c5ca9ca38908124e419e2ff5bb77b3799e54c9
Strip leading / from a repository name on ssh fetch/push
1 files modified
5 ■■■■■ changed files
src/main/java/com/gitblit/transport/ssh/git/BaseGitCommand.java 5 ●●●●● patch | view | raw | blame | history
src/main/java/com/gitblit/transport/ssh/git/BaseGitCommand.java
@@ -86,10 +86,9 @@
        repository = repository.replace('\\', '/');
        // ssh://git@thishost/path should always be name="/path" here
        //
        if (!repository.startsWith("/")) {
            throw new Failure(1, "fatal: '" + repository + "': not starts with / character");
        if (repository.startsWith("/")) {
            repository = repository.substring(1);
        }
        repository = repository.substring(1);
        try {
            return repositoryResolver.open(getContext().getClient(), repository);
        } catch (Exception e) {