mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-08 23:56:15 +02:00
Remove accidentally checked in code
This commit is contained in:
parent
eff931a138
commit
110ff38c0d
@ -270,12 +270,12 @@ func (c *GitCommand) Pull() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Push push to a branch
|
// 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 := ""
|
forceFlag := ""
|
||||||
if force {
|
if force {
|
||||||
forceFlag = "--force-with-lease "
|
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
|
// SquashPreviousTwoCommits squashes a commit down to the one below it
|
||||||
|
@ -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 {
|
if err := gui.createMessagePanel(gui.g, currentView, "", gui.Tr.SLocalize("PushWait")); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
branchName := gui.State.Branches[0].Name
|
go func() {
|
||||||
sub, err := gui.GitCommand.Push(branchName, force)
|
branchName := gui.State.Branches[0].Name
|
||||||
if err != nil {
|
if err := gui.GitCommand.Push(branchName, force); err != nil {
|
||||||
_ = gui.createErrorPanel(gui.g, err.Error())
|
_ = gui.createErrorPanel(gui.g, err.Error())
|
||||||
}
|
} else {
|
||||||
if sub != nil {
|
_ = gui.closeConfirmationPrompt(gui.g)
|
||||||
gui.SubProcess = sub
|
_ = gui.refreshCommits(gui.g)
|
||||||
return gui.Errors.ErrSubProcess
|
_ = gui.refreshStatus(gui.g)
|
||||||
}
|
}
|
||||||
_ = gui.closeConfirmationPrompt(gui.g)
|
}()
|
||||||
_ = gui.refreshStatus(gui.g)
|
return nil
|
||||||
return gui.refreshCommits(gui.g)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (gui *Gui) pushFiles(g *gocui.Gui, v *gocui.View) error {
|
func (gui *Gui) pushFiles(g *gocui.Gui, v *gocui.View) error {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user