mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-04-11 11:42:12 +02:00
Don't force-push if the remote branch is not stored locally
This broke with #3528. If the remote branch is not stored locally, we only see question marks in the branch status. In this case we can't tell whether we need to force-push, so it's best to assume that we don't, and see if the server rejects the push, and react to that by asking to force push. This second part is also broken right now, we'll fix this in the next commit.
This commit is contained in:
parent
ab797fe986
commit
993d66a8ff
@ -104,7 +104,7 @@ func (b *Branch) IsBehindForPull() bool {
|
||||
}
|
||||
|
||||
func (b *Branch) IsBehindForPush() bool {
|
||||
return b.BehindForPush != "" && b.BehindForPush != "0"
|
||||
return b.RemoteBranchStoredLocally() && b.BehindForPush != "0"
|
||||
}
|
||||
|
||||
// for when we're in a detached head state
|
||||
|
Loading…
x
Reference in New Issue
Block a user