summaryrefslogtreecommitdiffstats
path: root/pkg/gui/patch_options_panel.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-08-22 18:29:09 +1000
committerJesse Duffield <jessedduffield@gmail.com>2020-08-23 14:29:18 +1000
commit43d891b8d68c862da793429e0bdbca9dcabb44b0 (patch)
tree91ca072ea2d91eb156bd8c1958f8dbeb65c31c66 /pkg/gui/patch_options_panel.go
parent2eee079d3aafb7914947e85fe5decd528c34ab93 (diff)
support creating patches from files in diff mode
Diffstat (limited to 'pkg/gui/patch_options_panel.go')
-rw-r--r--pkg/gui/patch_options_panel.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/gui/patch_options_panel.go b/pkg/gui/patch_options_panel.go
index 4cee188f3..20b008459 100644
--- a/pkg/gui/patch_options_panel.go
+++ b/pkg/gui/patch_options_panel.go
@@ -29,7 +29,7 @@ func (gui *Gui) handleCreatePatchOptionsMenu(g *gocui.Gui, v *gocui.View) error
if gui.GitCommand.PatchManager.CanRebase {
menuItems = append(menuItems, []*menuItem{
{
- displayString: fmt.Sprintf("remove patch from original commit (%s)", gui.GitCommand.PatchManager.Parent),
+ displayString: fmt.Sprintf("remove patch from original commit (%s)", gui.GitCommand.PatchManager.To),
onPress: gui.handleDeletePatchFromCommit,
},
{
@@ -44,7 +44,7 @@ func (gui *Gui) handleCreatePatchOptionsMenu(g *gocui.Gui, v *gocui.View) error
if gui.currentContext() == gui.Contexts.BranchCommits.Context {
selectedCommit := gui.getSelectedLocalCommit()
- if selectedCommit != nil && gui.GitCommand.PatchManager.Parent != selectedCommit.Sha {
+ if selectedCommit != nil && gui.GitCommand.PatchManager.To != selectedCommit.Sha {
// adding this option to index 1
menuItems = append(
menuItems[:1],
@@ -66,7 +66,7 @@ func (gui *Gui) handleCreatePatchOptionsMenu(g *gocui.Gui, v *gocui.View) error
func (gui *Gui) getPatchCommitIndex() int {
for index, commit := range gui.State.Commits {
- if commit.Sha == gui.GitCommand.PatchManager.Parent {
+ if commit.Sha == gui.GitCommand.PatchManager.To {
return index
}
}