1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-02-03 13:21:56 +02:00

Remove accidentally checked in code

This commit is contained in:
Tommy Nguyen 2018-08-22 11:34:16 -04:00
parent eff931a138
commit 110ff38c0d
No known key found for this signature in database
GPG Key ID: DB7FA8161647D196
2 changed files with 13 additions and 14 deletions

View File

@ -270,12 +270,12 @@ func (c *GitCommand) Pull() error {
}
// Push push to a branch
func (c *GitCommand) Push(branchName string, force bool) (*exec.Cmd, error) {
func (c *GitCommand) Push(branchName string, force bool) error {
forceFlag := ""
if force {
forceFlag = "--force-with-lease "
}
return c.OSCommand.PrepareSubProcess(c.OSCommand.Platform.shell, c.OSCommand.Platform.shellArg, "git push " + forceFlag + "-u origin " + branchName)
return c.OSCommand.RunCommand("git push " + forceFlag + "-u origin " + branchName)
}
// SquashPreviousTwoCommits squashes a commit down to the one below it

View File

@ -364,18 +364,17 @@ func (gui *Gui) pushWithForceFlag(currentView *gocui.View, force bool) error {
if err := gui.createMessagePanel(gui.g, currentView, "", gui.Tr.SLocalize("PushWait")); err != nil {
return err
}
branchName := gui.State.Branches[0].Name
sub, err := gui.GitCommand.Push(branchName, force)
if err != nil {
_ = gui.createErrorPanel(gui.g, err.Error())
}
if sub != nil {
gui.SubProcess = sub
return gui.Errors.ErrSubProcess
}
_ = gui.closeConfirmationPrompt(gui.g)
_ = gui.refreshStatus(gui.g)
return gui.refreshCommits(gui.g)
go func() {
branchName := gui.State.Branches[0].Name
if err := gui.GitCommand.Push(branchName, force); err != nil {
_ = gui.createErrorPanel(gui.g, err.Error())
} else {
_ = gui.closeConfirmationPrompt(gui.g)
_ = gui.refreshCommits(gui.g)
_ = gui.refreshStatus(gui.g)
}
}()
return nil
}
func (gui *Gui) pushFiles(g *gocui.Gui, v *gocui.View) error {