You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default branch is not set when you create a new GIT repository and don't initialize it during creation.
When you open Settings > Git Settings in the repository the default branch is nonetheless set.
If I clone the repository via JGit programmatically, it responds that the HEAD is not set and the clone fails.
If I manually create a new branch, set this one as a the new default and then set the original one, it works as expected.
Cloning the repo via Git Bash works as expected in either case.
To me it seems that the UI shows a default branch, even tho none is set.
JGit seems to not be "intelligent" enough to resolve to the repository HEAD.
Bug Report
Describe how to reproduce the bug
Create a new GIT repository and don't tick the initialize repository checkbox.
Describe your SCM-Manager setup
SCM-Manager 2.41.1
JGit
Which operating system, browser and versions do you use?
Red Hat Enterprise Linux Server 7.9
The text was updated successfully, but these errors were encountered:
Thanks for the report. You are right and we will fix this. Currently the default branch can be shown in the ui but not be set.
We will check on the first push to a new repository whether a git config already exist. If the git config is not set yet, we will check the pushed branches and try to find the best candidate to be the default branch by heuristics.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
stalebot
added
the
stale
Issue is stale and will be closed if no further activity occurs
label
Sep 17, 2023
Issue description
The default branch is not set when you create a new GIT repository and don't initialize it during creation.
When you open Settings > Git Settings in the repository the default branch is nonetheless set.
If I clone the repository via JGit programmatically, it responds that the HEAD is not set and the clone fails.
If I manually create a new branch, set this one as a the new default and then set the original one, it works as expected.
Cloning the repo via Git Bash works as expected in either case.
To me it seems that the UI shows a default branch, even tho none is set.
JGit seems to not be "intelligent" enough to resolve to the repository HEAD.
Bug Report
Describe how to reproduce the bug
Create a new GIT repository and don't tick the initialize repository checkbox.
Describe your SCM-Manager setup
Which operating system, browser and versions do you use?
The text was updated successfully, but these errors were encountered: