Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] bug (and workaround) in org.eclipse.egit.core.op.ConfigureGerritAfterCloneTask.isGerrit

On Sat, Apr 4, 2015 at 5:48 PM, Chris Plock <plockc@xxxxxxxxx> wrote:
Hi,

Ran into this error while I was trying to get my first clone of a project in TFS 2013.  I'm running Feb build I pulled through the eclipse marketplace earlier this week:

https://github.com/eclipse/egit/blob/c894996fb6177a4868456e84bf248ed8bd24773f/org.eclipse.egit.core/src/org/eclipse/egit/core/op/ConfigureGerritAfterCloneTask.java

though i see the same line at 130 in master

String baseURL = uri.substring(0, uri.lastIndexOf(path));

org.eclipse.core.runtime.CoreException: String index out of range: -1
        at org.eclipse.egit.core.op.ConfigureGerritAfterCloneTask.execute(ConfigureGerritAfterCloneTask.java:89)
        at org.eclipse.egit.core.op.CloneOperation.run(CloneOperation.java:161)
        at org.eclipse.egit.ui.internal.clone.AbstractGitCloneWizard.executeCloneOperation(AbstractGitCloneWizard.java:442)
        at org.eclipse.egit.ui.internal.clone.AbstractGitCloneWizard.access$2(AbstractGitCloneWizard.java:435)
        at org.eclipse.egit.ui.internal.clone.AbstractGitCloneWizard$6.run(AbstractGitCloneWizard.java:414)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at java.lang.String.substring(String.java:1954)
        at org.eclipse.egit.core.op.ConfigureGerritAfterCloneTask.isGerrit(ConfigureGerritAfterCloneTask.java:125)
        at org.eclipse.egit.core.op.ConfigureGerritAfterCloneTask.execute(ConfigureGerritAfterCloneTask.java:83)
        ... 5 more


My obfuscated URL is:
http://myserver.net:8080/tfs/Projects/Repo%20-%20Git/_git/backend

I had the admin create a new project without the escaped "space" characters, migrated the repo over, and I didn't get an error for cloning the new repository.

I filed
to track this problem and pushed a fix for review
Please try if this fixes your problem and comment on the change in review.

-Matthias 

Back to the top