[
https://issues.apache.org/jira/browse/NETBEANS-4990?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17279676#comment-17279676
]
Tomáš Procházka commented on NETBEANS-4990:
-------------------------------------------
I tried to setup initial branch name from Git settings but without any success.
Current JGit does not support this option and default branch has always name
"master".
Here is request for this function in JGit Bugzilla:
[https://bugs.eclipse.org/bugs/show_bug.cgi?id=564794]
Following snippet can be used to get name of default branch from settings:
{code:java}
import org.eclipse.jgit.lib.StoredConfig;
import org.eclipse.jgit.util.SystemReader;
function String getDefaultBranchName() {
StoredConfig userConfig = SystemReader.getInstance().getUserConfig();
String branchName = userConfig.getString("init", null, "defaultBranch");
return branchName;
}
{code}
> Modify all references to Github MASTER branch to reference MAIN.
> ----------------------------------------------------------------
>
> Key: NETBEANS-4990
> URL: https://issues.apache.org/jira/browse/NETBEANS-4990
> Project: NetBeans
> Issue Type: Improvement
> Components: versioncontrol - Git
> Affects Versions: 12.2
> Reporter: Chris Luff
> Priority: Minor
>
> Remove references to MASTER in objects and allow the default branch name to a
> configurable item.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists