1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-25 22:32:13 +02:00

allow renames to be discarded

This commit is contained in:
Jesse Duffield
2020-08-07 17:52:17 +10:00
parent a86103479b
commit 469ac116ef
4 changed files with 78 additions and 7 deletions

View File

@@ -1,5 +1,7 @@
package commands
import "strings"
// File : A file from git status
// duplicating this for now
type File struct {
@@ -14,3 +16,7 @@ type File struct {
Type string // one of 'file', 'directory', and 'other'
ShortStatus string // e.g. 'AD', ' A', 'M ', '??'
}
func (f *File) IsRename() bool {
return strings.Contains(f.Name, " -> ")
}