1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +02:00

Extend reset/rebase test to use upstream branch name that is different from local one

The easiest way to do that is to rename the local branch after pushing.

This shows various levels of brokenness for the reset and rebase to upstream
commands: both menu entries display the wrong upstream branch name in the menu
(the local one rather than the remote one); executing the rebase command works
correctly though, the rebase command uses the right branch name. Resetting
fails, though.

We'll fix this in the next commit.
This commit is contained in:
Stefan Haller
2025-01-04 15:27:03 +01:00
parent ef718f3386
commit 33e81f717d
3 changed files with 30 additions and 7 deletions

View File

@ -142,6 +142,10 @@ func (self *Shell) NewBranchFrom(name string, from string) *Shell {
return self.RunCommand([]string{"git", "checkout", "-b", name, from})
}
func (self *Shell) RenameCurrentBranch(newName string) *Shell {
return self.RunCommand([]string{"git", "branch", "-m", newName})
}
func (self *Shell) Checkout(name string) *Shell {
return self.RunCommand([]string{"git", "checkout", name})
}