mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-11-29 22:48:24 +02:00
fix: fix stash with empty message
This commit is contained in:
@@ -17,6 +17,14 @@ func SplitLines(multilineString string) []string {
|
||||
return lines
|
||||
}
|
||||
|
||||
func SplitNul(str string) []string {
|
||||
if str == "" {
|
||||
return make([]string, 0)
|
||||
}
|
||||
str = strings.TrimSuffix(str, "\x00")
|
||||
return strings.Split(str, "\x00")
|
||||
}
|
||||
|
||||
// NormalizeLinefeeds - Removes all Windows and Mac style line feeds
|
||||
func NormalizeLinefeeds(str string) string {
|
||||
str = strings.Replace(str, "\r\n", "\n", -1)
|
||||
|
||||
Reference in New Issue
Block a user