| Summary: | Problem with CloneOperation and refs/tags/ | ||
|---|---|---|---|
| Product: | [Technology] EGit | Reporter: | Igor Fedorenko <igor> |
| Component: | Core | Assignee: | Stefan Lay <stefan.lay> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | matthias.sohn, stefan.lay |
| Version: | 0.9.0 | ||
| Target Milestone: | 0.10.0 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
|
Description
Igor Fedorenko
I could reproduce that. Bit I already get an exception in the clone wizard: java.lang.StringIndexOutOfBoundsException: String index out of range: -7 at java.lang.String.substring(String.java:1937) at java.lang.String.substring(String.java:1904) at org.eclipse.egit.ui.internal.clone.SourceBranchPage$1.getText(SourceBranchPage.java:128) at org.eclipse.jface.viewers.WrappedViewerLabelProvider.getText(WrappedViewerLabelProvider.java:108) at org.eclipse.jface.viewers.WrappedViewerLabelProvider.update(WrappedViewerLabelProvider.java:164) at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:145) When I continue I have the same behavior as secribed by Igor. My cloned repo has no HEAD and no branches. To clarify, I was using CloneOperation directly, without using egit GUI. I can reproduce the error. The EGit operatoin writes ref: refs/tags/TagForDemo into the HEAD file. This seems not to work. "git checkout sometag" replaces this by the commit id and everything works. In the proposal http://egit.eclipse.org/r/#change,2003 we changed the API of CloneOperation. The former String parameter "branch" which contained the ref name of the branch to check out is replaced by a parameter of type Ref. This Ref must exist in the cloned repo. An example code how to get such a ref is e.g. in org.eclipse.egit.ui.view.repositories.GitRepositoriesViewBranchHandlingTest.beforeClass(). This should work for tags now. merged as 35b7b6520355106dd62f2f241e71843a56b62503 will be shipped with 0.10 |