mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
commands/git : reverse the logic
This commit is contained in:
@ -484,12 +484,13 @@ func (c *GitCommand) GetCommits() []Commit {
|
|||||||
func (c *GitCommand) GetLog() string {
|
func (c *GitCommand) GetLog() string {
|
||||||
// currently limiting to 30 for performance reasons
|
// currently limiting to 30 for performance reasons
|
||||||
// TODO: add lazyloading when you scroll down
|
// TODO: add lazyloading when you scroll down
|
||||||
if result, err := c.OSCommand.RunCommandWithOutput("git log --oneline -30"); err == nil {
|
result, err := c.OSCommand.RunCommandWithOutput("git log --oneline -30")
|
||||||
return result
|
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 result
|
||||||
return ""
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ignore adds a file to the gitignore for the repo
|
// Ignore adds a file to the gitignore for the repo
|
||||||
|
Reference in New Issue
Block a user