mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-13 05:15:53 +02:00
more work on rebasing feature
This commit is contained in:
parent
ad93b4c863
commit
e011e9bc42
15 changed files with 270 additions and 200 deletions
|
@ -274,26 +274,6 @@ func (c *GitCommand) RebaseBranch(onto string) error {
|
|||
return c.OSCommand.RunCommand(fmt.Sprintf("git rebase %s %s ", onto, curBranch))
|
||||
}
|
||||
|
||||
func (c *GitCommand) ContinueRebaseBranch() error {
|
||||
return c.OSCommand.RunCommand("git rebase --continue")
|
||||
}
|
||||
|
||||
func (c *GitCommand) SkipRebaseBranch() error {
|
||||
return c.OSCommand.RunCommand("git rebase --skip")
|
||||
}
|
||||
|
||||
func (c *GitCommand) AbortRebaseBranch() error {
|
||||
return c.OSCommand.RunCommand("git rebase --abort")
|
||||
}
|
||||
|
||||
func (c *GitCommand) ContinueMergeBranch() error {
|
||||
return c.OSCommand.RunCommand("git merge --continue")
|
||||
}
|
||||
|
||||
func (c *GitCommand) AbortMergeBranch() error {
|
||||
return c.OSCommand.RunCommand("git merge --abort")
|
||||
}
|
||||
|
||||
// Fetch fetch git repo
|
||||
func (c *GitCommand) Fetch(unamePassQuestion func(string) string, canAskForCredentials bool) error {
|
||||
return c.OSCommand.DetectUnamePass("git fetch", func(question string) string {
|
||||
|
@ -787,3 +767,10 @@ func (c *GitCommand) FastForward(branchName string) error {
|
|||
upstream := "origin" // hardcoding for now
|
||||
return c.OSCommand.RunCommand(fmt.Sprintf("git fetch %s %s:%s", upstream, branchName, branchName))
|
||||
}
|
||||
|
||||
// GenericMerge takes a commandType of "merging" or "rebasing" and a command of "abort", "skip" or "continue"
|
||||
// By default we skip the editor in the case where a commit will be made
|
||||
func (c *GitCommand) GenericMerge(commandType string, command string) error {
|
||||
gitCommand := fmt.Sprintf("git %s %s --%s", c.OSCommand.Platform.skipEditorArg, commandType, command)
|
||||
return c.OSCommand.RunCommand(gitCommand)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue