1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-03-05 15:15:49 +02:00

commands/git : reverse the logic

This commit is contained in:
Anthony HAMON 2018-09-18 09:23:41 +02:00
parent 6f0b32f95e
commit 60cf549a32

View File

@ -484,12 +484,13 @@ func (c *GitCommand) GetCommits() []Commit {
func (c *GitCommand) GetLog() string {
// currently limiting to 30 for performance reasons
// TODO: add lazyloading when you scroll down
if result, err := c.OSCommand.RunCommandWithOutput("git log --oneline -30"); err == nil {
return result
result, err := c.OSCommand.RunCommandWithOutput("git log --oneline -30")
if err != nil {
// assume if there is an error there are no commits yet for this branch
return ""
}
// assume if there is an error there are no commits yet for this branch
return ""
return result
}
// Ignore adds a file to the gitignore for the repo