| Summary: | Decapitation error when pulling after cloning with CloneCommand | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Technology] JGit | Reporter: | Tomasz Zarna <tomasz.zarna> | ||||
| Component: | JGit | Assignee: | Stefan Lay <stefan.lay> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | major | ||||||
| Priority: | P3 | CC: | caniszczyk, stefan.lay | ||||
| Version: | unspecified | ||||||
| Target Milestone: | 0.12-M2 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| URL: | http://egit.eclipse.org/r/2677 | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 339110, 339115, 339254 | ||||||
| Attachments: |
|
||||||
|
Description
Tomasz Zarna
Created attachment 190756 [details]
failing test
(In reply to comment #0) > I will try to provide a fix, and when ready will submit both (test + fix) on gerrit. http://egit.eclipse.org/r/2677 I'm not able to do "git checkout master" on the clone neither (see bug 339254, comment 6). I'm really stuck, so bumping severity. Thanks for investigating. I suppose the reason is that the CloneCommand does not checkout a branch but the commit where HEAD points to at the remote repo. The reason is that
final Ref head = result.getAdvertisedRef("HEAD")
does not return the name of the remotely checked out branch but only the commit ID.
In egit there is a heuristic to find the corresponding branch. However, there must be a better solution for this. I asked this question on the jgit mailing list: http://dev.eclipse.org/mhonarc/lists/jgit-dev/msg01037.html
The current shape of the CloneCommand is going to be a show stopper for bug 339115 where I'm trying to push local changes. I found that out while writing junits for bug 339110. Stefan, looking the the latest response from Shawn on the jgit mailing list, does it mean there is nothing we can do about it? What about the fix proposed on http://egit.eclipse.org/r/2677? Is it no good? It works for me, at least junits for bug 339110 are happy ;) I proposed a change on Gerrit (http://egit.eclipse.org/r/#change,3008) which does the same as EGit does to checkout a branch after clone. This should also solve the problem of a subsequent pull. Fixed, thanks Stefan. |