1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-03-31 22:22:14 +02:00
Stefan Haller 5c55ce6555 Better prompt for discarding old file changes
Lazygit knows what kind of file change this is, so there doesn't have to be any
"if" in the prompt text.
2023-06-07 12:47:03 +02:00

26 lines
496 B
Go

package models
// CommitFile : A git commit file
type CommitFile struct {
// TODO: rename this to Path
Name string
ChangeStatus string // e.g. 'A' for added or 'M' for modified. This is based on the result from git diff --name-status
}
func (f *CommitFile) ID() string {
return f.Name
}
func (f *CommitFile) Description() string {
return f.Name
}
func (f *CommitFile) Added() bool {
return f.ChangeStatus == "A"
}
func (f *CommitFile) Deleted() bool {
return f.ChangeStatus == "D"
}