Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Invalid branch name(JGit throwing InvalidRefNameException (used to work in version 4))
Invalid branch name [message #1794111] Thu, 23 August 2018 18:48 Go to next message
Guillermo Coscarelli is currently offline Guillermo CoscarelliFriend
Messages: 2
Registered: June 2018
Junior Member

I have migrated to version 5.0.2 and trying to create a new branch name with "-feat--ure/1.0-" .
returns true.
But I am still getting the exception when doing
It used to work in version 4.11.0

Has this validation changed?

Starting dash seems to be the problem. Command line Git allows that.


[Updated on: Thu, 23 August 2018 19:03]

Report message to a moderator

Re: Invalid branch name [message #1794150 is a reply to message #1794111] Fri, 24 August 2018 12:54 Go to previous message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1122
Registered: July 2009
Senior Member
yes, see [1] which fixes [2]. Now branch names cannot start with a '-' anymore which is also rejected by native git.

The following checks need to pass with result true for a branch name to be valid [3]:
- Repository.isValidRefName(String refName)
- CreateBranchCommand.isValidBranchName(String branchName)

Previous Topic:Java 11 Compatibility check: JGit
Next Topic:Wanna use 'org.eclipse.egit.github.core' in a project
Goto Forum:

Current Time: Sun Feb 23 22:48:33 GMT 2020

Powered by FUDForum. Page generated in 0.08087 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top