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

Bug 331852

Summary: CreateBranchCommand: if name of new branch starts with refs/heads/, don't add it a second time
Product: [Technology] JGit Reporter: Manuel Doninger <manuel.doninger>
Component: JGitAssignee: Project Inbox <jgit.core-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: caniszczyk
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Patch for adding the Refs-Prefix none

Description Manuel Doninger CLA 2010-12-04 16:39:52 EST
Build Identifier: Commit-ID e0a9961b781db240d71190dece2fd2c70ea79765

In the class CreateBranchCommand the prefix refs/heads/ is automatically added to the name of the new branch.
This shouldn't be done, if the supplied name for the new branch already starts with refs/heads/, i.e. it was manually typed in like in EGit or other tools, that use JGit.

Reproducible: Always

Steps to Reproduce:
1. Set the name for the new branch as refs/heads/newname
2.
3.
Comment 1 Manuel Doninger CLA 2010-12-04 16:45:12 EST
Created attachment 184540 [details]
Patch for adding the Refs-Prefix
Comment 2 Chris Aniszczyk CLA 2010-12-05 10:47:48 EST
Hi Manuel, can you contribute this patch and test case via Gerrit?

http://wiki.eclipse.org/EGit/Contributor_Guide#Contributing_Patches
Comment 3 Manuel Doninger CLA 2010-12-05 12:21:33 EST
Ok, i submitted this via Gerrit.