File: remote_branch.go

package info (click to toggle)
lazygit 0.50.0%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 6,808 kB
  • sloc: sh: 128; makefile: 76
file content (35 lines) | stat: -rw-r--r-- 634 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package models

// Remote Branch : A git remote branch
type RemoteBranch struct {
	Name       string
	RemoteName string
}

func (r *RemoteBranch) FullName() string {
	return r.RemoteName + "/" + r.Name
}

func (r *RemoteBranch) FullRefName() string {
	return "refs/remotes/" + r.FullName()
}

func (r *RemoteBranch) RefName() string {
	return r.FullName()
}

func (r *RemoteBranch) ShortRefName() string {
	return r.RefName()
}

func (r *RemoteBranch) ParentRefName() string {
	return r.RefName() + "^"
}

func (r *RemoteBranch) ID() string {
	return r.RefName()
}

func (r *RemoteBranch) Description() string {
	return r.RefName()
}