mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-28 16:02:01 +03:00
fix: fix ambiguous refname
This commit is contained in:
@ -18,6 +18,10 @@ type Branch struct {
|
||||
UpstreamBranch string
|
||||
}
|
||||
|
||||
func (b *Branch) FullRefName() string {
|
||||
return "refs/heads/" + b.Name
|
||||
}
|
||||
|
||||
func (b *Branch) RefName() string {
|
||||
return b.Name
|
||||
}
|
||||
|
@ -29,6 +29,10 @@ func (c *Commit) ShortSha() string {
|
||||
return utils.ShortSha(c.Sha)
|
||||
}
|
||||
|
||||
func (c *Commit) FullRefName() string {
|
||||
return c.Sha
|
||||
}
|
||||
|
||||
func (c *Commit) RefName() string {
|
||||
return c.Sha
|
||||
}
|
||||
|
@ -10,6 +10,10 @@ 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()
|
||||
}
|
||||
|
@ -8,6 +8,10 @@ type StashEntry struct {
|
||||
Name string
|
||||
}
|
||||
|
||||
func (s *StashEntry) FullRefName() string {
|
||||
return s.RefName()
|
||||
}
|
||||
|
||||
func (s *StashEntry) RefName() string {
|
||||
return fmt.Sprintf("stash@{%d}", s.Index)
|
||||
}
|
||||
|
@ -5,6 +5,10 @@ type Tag struct {
|
||||
Name string
|
||||
}
|
||||
|
||||
func (t *Tag) FullRefName() string {
|
||||
return "refs/tags/" + t.RefName()
|
||||
}
|
||||
|
||||
func (t *Tag) RefName() string {
|
||||
return t.Name
|
||||
}
|
||||
|
Reference in New Issue
Block a user