2018-08-13 20:26:02 +10:00
|
|
|
package commands
|
2018-08-10 21:33:49 +10:00
|
|
|
|
2018-08-13 20:26:02 +10:00
|
|
|
// Branch : A git branch
|
|
|
|
// duplicating this for now
|
|
|
|
type Branch struct {
|
2020-03-26 20:29:35 +11:00
|
|
|
Name string
|
|
|
|
// the displayname is something like '(HEAD detached at 123asdf)', whereas in that case the name would be '123asdf'
|
|
|
|
DisplayName string
|
2020-03-17 21:22:07 +11:00
|
|
|
Recency string
|
|
|
|
Pushables string
|
|
|
|
Pullables string
|
|
|
|
UpstreamName string
|
2020-03-19 12:04:17 +11:00
|
|
|
Head bool
|
2018-08-10 21:33:49 +10:00
|
|
|
}
|
2020-08-19 22:57:22 +10:00
|
|
|
|
|
|
|
func (b *Branch) RefName() string {
|
|
|
|
return b.Name
|
|
|
|
}
|
2020-08-22 09:01:14 +10:00
|
|
|
|
|
|
|
func (b *Branch) ID() string {
|
|
|
|
return b.RefName()
|
|
|
|
}
|