1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-28 04:23:58 +03:00
Files
lazygit/pkg/commands/file.go
2020-08-07 18:01:26 +10:00

23 lines
577 B
Go

package commands
import "strings"
// File : A file from git status
// duplicating this for now
type File struct {
Name string
HasStagedChanges bool
HasUnstagedChanges bool
Tracked bool
Deleted bool
HasMergeConflicts bool
HasInlineMergeConflicts bool
DisplayString string
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, " -> ")
}