-
I found no
Branch.javaor persistentBranchentity in the current non-commercial server source.Current representation and identity handling:
- Branches are native Git refs under
refs/heads/.Project.getBranchRefs()obtains them fromGitService, andRefFacadecontains only the ref name plus the referenced/peeled Git objects. - The repository REST API likewise exposes a branch as
refNameand tipcommitHash; it does not expose an owner or creator. - The branches page displays the tip commit author/committer via
ContributorPanel. That is commit authorship, not branch ownership. - A Git push creates a
RefUpdatedevent carrying the authenticated OneDev user, so listeners can identify who performed that update. This is event context, not durable per-branch metadata. Server-side branch creation throughGitService.createBranch(...)emits the event without a user. - Branch authorization is evaluated from project permissions and branch protection rules for the acting user; it is not based on an owner field.
- Issue-to-branch association is also not persisted on a branch model.
Issue.getBranch()scans refs and recognizes theissue-<number>[-<title>]naming convention.
I also found no branch-related
isDraft,getDraft,setDraft, or equivalent draft field. Branch names are required and validated as Git ref names, so there is no unnamed-branch state. The few source occurrences of “unnamed” or “draft” are unrelated infrastructure/UI-library terminology.So if branch ownership, draft branches, or unnamed placeholders are needed, they would be new persisted metadata rather than extensions to an existing branch model.
- Branches are native Git refs under
-
Previous Value Current Value Open
Closed
| Type |
Question
|
| Priority |
Normal
|
| Assignee | |
| Labels |
No labels
|
Issue Votes (0)
Need to find the Branch.java model and understand how branch ownership/author is tracked today. Also check if there are any existing 'isDraft' or unnamed-related concepts already implemented.