summaryrefslogtreecommitdiffstats
path: root/pkg/commands/commit_file.go
blob: c2131ace1e6ced6b621952fdfd61c88dcb91e9ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package commands

// CommitFile : A git commit file
type CommitFile struct {
	// 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}'
	Parent string
	Name   string

	// 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'

	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
}