mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-15 00:15:32 +02:00
fix: fix ambiguous branch name
test: add an integration test for checkout branch by name fix: fix full ref name of detached head refactor: refactor current branch loader chore: use field name explicitly
This commit is contained in:
committed by
Jesse Duffield
parent
b33ec5a050
commit
52a2e4c1dc
@ -11,6 +11,7 @@ type Branch struct {
|
||||
Pullables string
|
||||
UpstreamGone bool
|
||||
Head bool
|
||||
DetachedHead bool
|
||||
// if we have a named remote locally this will be the name of that remote e.g.
|
||||
// 'origin' or 'tiwood'. If we don't have the remote locally it'll look like
|
||||
// 'git@github.com:tiwood/lazygit.git'
|
||||
@ -19,6 +20,9 @@ type Branch struct {
|
||||
}
|
||||
|
||||
func (b *Branch) FullRefName() string {
|
||||
if b.DetachedHead {
|
||||
return b.Name
|
||||
}
|
||||
return "refs/heads/" + b.Name
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user