Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 347289

Summary: [server] Git Checkout and Delete issues when branch and tag with the same name exist
Product: [ECD] Orion Reporter: Szymon Brandys <Szymon.Brandys>
Component: GitAssignee: Project Inbox <orion.git-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P4 CC: Szymon.Brandys
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 347943    
Bug Blocks:    

Description Szymon Brandys CLA 2011-05-26 06:57:20 EDT
I have a repo where there is a tag and a local branch with the same name. Checkout on this name, checks out the tag, not the branch. Git console does the following:

$ git checkout R0_2M4
warning: refname 'R0_2M4' is ambiguous.
Switched to branch 'R0_2M4'
Comment 1 Tomasz Zarna CLA 2011-05-26 07:03:39 EDT
Would checking out the branch with a warning about ambiguity be ok?
Comment 2 Tomasz Zarna CLA 2011-06-06 10:08:41 EDT
Szymon is planning to add support for "fully qualified" ref names (refs/tags/{tag} instead of just {tag}, same thing for branches) on bug 347943. When fixed the problem described here should be no longer an issue.
Comment 3 Tomasz Zarna CLA 2011-06-09 10:22:31 EDT
Setting target to 0.2RC2 to get in line with blocking bug 347943.
Comment 4 Tomasz Zarna CLA 2011-07-14 05:22:54 EDT
Target removed as in the blocking bug.
Comment 5 Tomasz Zarna CLA 2012-04-23 04:53:09 EDT
A two-fold approach should be taken here:
1. With bug 347943 fixed, the checkout command should require full name of a ref ie refs/tags/test or refs/heads/test.
2. In case of an ambiguity ie not sure if you meant branch or tag, the former should be checked out, just like in the console.
Comment 6 John Arthorne CLA 2015-05-05 14:50:21 EDT
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see:

https://dev.eclipse.org/mhonarc/lists/orion-dev/msg03444.html