summaryrefslogtreecommitdiffstats
path: root/pkg/commands/git.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-09-29 18:48:38 +1000
committerJesse Duffield <jessedduffield@gmail.com>2020-09-29 20:48:49 +1000
commitf9643448a4ba186fb56d408a5ee8a21193986cd6 (patch)
treea15d3291ebc269536c3abbbf88542a25689a971c /pkg/commands/git.go
parent91f0b0e28fb93bf715a4fda67fcbb400ffbc680b (diff)
move commit files
Diffstat (limited to 'pkg/commands/git.go')
-rw-r--r--pkg/commands/git.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/commands/git.go b/pkg/commands/git.go
index 2d75330e6..5c3e423db 100644
--- a/pkg/commands/git.go
+++ b/pkg/commands/git.go
@@ -1120,7 +1120,7 @@ func (c *GitCommand) CherryPickCommits(commits []*models.Commit) error {
}
// GetFilesInDiff get the specified commit files
-func (c *GitCommand) GetFilesInDiff(from string, to string, reverse bool, patchManager *patch.PatchManager) ([]*CommitFile, error) {
+func (c *GitCommand) GetFilesInDiff(from string, to string, reverse bool, patchManager *patch.PatchManager) ([]*models.CommitFile, error) {
reverseFlag := ""
if reverse {
reverseFlag = " -R "
@@ -1135,8 +1135,8 @@ func (c *GitCommand) GetFilesInDiff(from string, to string, reverse bool, patchM
}
// filenames string is something like "file1\nfile2\nfile3"
-func (c *GitCommand) GetCommitFilesFromFilenames(filenames string, parent string, patchManager *patch.PatchManager) []*CommitFile {
- commitFiles := make([]*CommitFile, 0)
+func (c *GitCommand) GetCommitFilesFromFilenames(filenames string, parent string, patchManager *patch.PatchManager) []*models.CommitFile {
+ commitFiles := make([]*models.CommitFile, 0)
for _, line := range strings.Split(strings.TrimRight(filenames, "\n"), "\n") {
// typical result looks like 'A my_file' meaning my_file was added
@@ -1150,7 +1150,7 @@ func (c *GitCommand) GetCommitFilesFromFilenames(filenames string, parent string
status = patchManager.GetFileStatus(name)
}
- commitFiles = append(commitFiles, &CommitFile{
+ commitFiles = append(commitFiles, &models.CommitFile{
Parent: parent,
Name: name,
ChangeStatus: changeStatus,