mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 12:55:47 +02:00
better upstream tracking and allow renaming a branch
This commit is contained in:
parent
2169b5109f
commit
1be0ff8da7
12 changed files with 222 additions and 146 deletions
|
@ -343,7 +343,7 @@ func (c *GitCommand) CurrentBranchName() (string, error) {
|
|||
match := re.FindStringSubmatch(output)
|
||||
branchName = match[1]
|
||||
}
|
||||
return utils.TrimTrailingNewline(branchName), nil
|
||||
return strings.TrimSpace(branchName), nil
|
||||
}
|
||||
|
||||
// DeleteBranch delete branch
|
||||
|
@ -1163,3 +1163,7 @@ func (c *GitCommand) GetPager(width int) string {
|
|||
func (c *GitCommand) colorArg() string {
|
||||
return c.Config.GetUserConfig().GetString("git.paging.colorArg")
|
||||
}
|
||||
|
||||
func (c *GitCommand) RenameBranch(oldName string, newName string) error {
|
||||
return c.OSCommand.RunCommand("git branch --move %s %s", oldName, newName)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue