mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-28 16:02:01 +03:00
support reverting merge commits
This commit is contained in:
@ -87,6 +87,14 @@ func TruncateWithEllipsis(str string, limit int) string {
|
||||
return str[0:remainingLength] + "..."
|
||||
}
|
||||
|
||||
func SafeTruncate(str string, limit int) string {
|
||||
if len(str) > limit {
|
||||
return str[0:limit]
|
||||
} else {
|
||||
return str
|
||||
}
|
||||
}
|
||||
|
||||
func FindStringSubmatch(str string, regexpStr string) (bool, []string) {
|
||||
re := regexp.MustCompile(regexpStr)
|
||||
match := re.FindStringSubmatch(str)
|
||||
|
Reference in New Issue
Block a user