mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-03-05 15:15:49 +02:00
Simplified code a bit
This commit is contained in:
parent
8f734b11e3
commit
975a5315b0
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user