Rename Force to ForceWithLease

This describes better what it is, and we're going to add the regular --force in
the next commit.

No change in behavior in this commit.
This commit is contained in:
Stefan Haller 2024-05-30 21:03:02 +02:00
parent aac2535104
commit e93617b1de
3 changed files with 15 additions and 15 deletions

View file

@ -18,7 +18,7 @@ func NewSyncCommands(gitCommon *GitCommon) *SyncCommands {
// Push pushes to a branch
type PushOpts struct {
Force bool
ForceWithLease bool
UpstreamRemote string
UpstreamBranch string
SetUpstream bool
@ -30,7 +30,7 @@ func (self *SyncCommands) PushCmdObj(task gocui.Task, opts PushOpts) (oscommands
}
cmdArgs := NewGitCmd("push").
ArgIf(opts.Force, "--force-with-lease").
ArgIf(opts.ForceWithLease, "--force-with-lease").
ArgIf(opts.SetUpstream, "--set-upstream").
ArgIf(opts.UpstreamRemote != "", opts.UpstreamRemote).
ArgIf(opts.UpstreamBranch != "", opts.UpstreamBranch).