diff options
Diffstat (limited to 'pkg/commands/file.go')
-rw-r--r-- | pkg/commands/file.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/commands/file.go b/pkg/commands/file.go index 37a1dcccb..754b2871f 100644 --- a/pkg/commands/file.go +++ b/pkg/commands/file.go @@ -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, " -> ") +} |