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

Add command "View divergence from base branch"

This commit is contained in:
Stefan Haller
2024-05-02 09:46:35 +02:00
parent 4ac77f4575
commit 343db7b3f1
5 changed files with 93 additions and 0 deletions

View File

@ -1,6 +1,8 @@
package helpers
import (
"strings"
"github.com/jesseduffield/gocui"
"github.com/jesseduffield/lazygit/pkg/gui/types"
"github.com/jesseduffield/lazygit/pkg/utils"
@ -44,3 +46,7 @@ func (self *BranchesHelper) ConfirmDeleteRemote(remoteName string, branchName st
},
})
}
func ShortBranchName(fullBranchName string) string {
return strings.TrimPrefix(strings.TrimPrefix(fullBranchName, "refs/heads/"), "refs/remotes/")
}