Skip to content

Commit

Permalink
Simplified code a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
muesli authored and jesseduffield committed Jul 27, 2019
1 parent 8f734b1 commit 975a531
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions pkg/commands/git.go
Expand Up @@ -906,10 +906,8 @@ func (c *GitCommand) DiscardOldFileChanges(commits []*Commit, commitIndex int, f
if err := c.StageFile(fileName); err != nil {
return err
}
} else {
if err := c.CheckoutFile("HEAD^", fileName); err != nil {
return err
}
} else if err := c.CheckoutFile("HEAD^", fileName); err != nil {
return err
}

// amend the commit
Expand Down
2 changes: 1 addition & 1 deletion pkg/gui/theme.go
Expand Up @@ -31,7 +31,7 @@ func (gui *Gui) GetAttribute(key string) gocui.Attribute {
func (gui *Gui) GetColor(keys []string) gocui.Attribute {
var attribute gocui.Attribute
for _, key := range keys {
attribute = attribute | gui.GetAttribute(key)
attribute |= gui.GetAttribute(key)
}
return attribute
}
Expand Down

0 comments on commit 975a531

Please sign in to comment.