1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-03-23 21:51:07 +02:00
lazygit/pkg/commands/models/remote_branch.go

28 lines
476 B
Go
Raw Normal View History

2020-09-29 18:41:06 +10:00
package models
2019-11-17 10:23:06 +11:00
// Remote Branch : A git remote branch
type RemoteBranch struct {
Name string
RemoteName string
2019-11-17 10:23:06 +11:00
}
func (r *RemoteBranch) FullName() string {
return r.RemoteName + "/" + r.Name
}
2020-08-19 22:57:22 +10:00
func (r *RemoteBranch) RefName() string {
return r.FullName()
}
2022-03-26 22:18:08 +09:00
func (r *RemoteBranch) ParentRefName() string {
return r.RefName() + "^"
}
func (r *RemoteBranch) ID() string {
return r.RefName()
}
func (r *RemoteBranch) Description() string {
return r.RefName()
}