summaryrefslogtreecommitdiffstats
path: root/pkg/commands/git.go
diff options
context:
space:
mode:
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 eac5c0a53..243457c4f 100644
--- a/pkg/commands/git.go
+++ b/pkg/commands/git.go
@@ -1046,13 +1046,13 @@ func (c *GitCommand) CherryPickCommits(commits []*Commit) error {
}
// GetFilesInRef get the specified commit files
-func (c *GitCommand) GetFilesInRef(commitSha string, isStash bool, patchManager *patch.PatchManager) ([]*CommitFile, error) {
+func (c *GitCommand) GetFilesInRef(parent string, isStash bool, patchManager *patch.PatchManager) ([]*CommitFile, error) {
command := "git diff-tree"
if isStash {
command = "git stash show"
}
- files, err := c.OSCommand.RunCommandWithOutput("%s --no-commit-id --name-only -r --no-renames %s", command, commitSha)
+ files, err := c.OSCommand.RunCommandWithOutput("%s --no-commit-id --name-only -r --no-renames %s", command, parent)
if err != nil {
return nil, err
}
@@ -1061,12 +1061,12 @@ func (c *GitCommand) GetFilesInRef(commitSha string, isStash bool, patchManager
for _, file := range strings.Split(strings.TrimRight(files, "\n"), "\n") {
status := patch.UNSELECTED
- if patchManager != nil && patchManager.CommitSha == commitSha {
+ if patchManager != nil && patchManager.CommitSha == parent {
status = patchManager.GetFileStatus(file)
}
commitFiles = append(commitFiles, &CommitFile{
- Sha: commitSha,
+ Parent: parent,
Name: file,
DisplayString: file,
Status: status,