Rename Name to Path in File and CommitFile

Name was very confusing and misleading.
This commit is contained in:
Stefan Haller 2025-02-28 20:59:09 +01:00
parent 0b5504aa98
commit 2dfc3491bd
22 changed files with 217 additions and 218 deletions

View file

@ -2,18 +2,17 @@ package models
// CommitFile : A git commit file
type CommitFile struct {
// TODO: rename this to Path
Name string
Path 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
return f.Path
}
func (f *CommitFile) Description() string {
return f.Name
return f.Path
}
func (f *CommitFile) Added() bool {
@ -25,5 +24,5 @@ func (f *CommitFile) Deleted() bool {
}
func (f *CommitFile) GetPath() string {
return f.Name
return f.Path
}