2019-03-09 16:42:10 +02:00
package commands
// CommitFile : A git commit file
type CommitFile struct {
2020-08-22 10:29:09 +02:00
// Parent is the identifier of the parent object e.g. a commit SHA if this commit file is for a commit, or a stash entry ref like 'stash@{1}'
2020-08-23 06:20:28 +02:00
Parent string
Name string
2020-08-23 07:04:12 +02:00
// PatchStatus tells us whether the file has been wholly or partially added to a patch. We might want to pull this logic up into the gui package and make it a map like we do with cherry picked commits
PatchStatus int // one of 'WHOLE' 'PART' 'NONE'
2020-08-23 06:20:28 +02:00
ChangeStatus string // e.g. 'A' for added or 'M' for modified. This is based on the result from git diff --name-status
2019-03-09 16:42:10 +02:00
}
2020-08-22 01:01:14 +02:00
func ( f * CommitFile ) ID ( ) string {
return f . Name
}
2020-08-22 02:14:53 +02:00
func ( f * CommitFile ) Description ( ) string {
return f . Name
}