mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-02-03 13:21:56 +02:00
show graph when selecting branch in branch panel
This commit is contained in:
parent
3ee9687540
commit
a02d3a0c4e
@ -90,7 +90,7 @@ func handleBranchSelect(g *gocui.Gui, v *gocui.View) error {
|
||||
}
|
||||
go func() {
|
||||
branch := getSelectedBranch(v)
|
||||
diff, _ := getBranchDiff(branch.Name, branch.BaseBranch)
|
||||
diff, _ := getBranchGraph(branch.Name, branch.BaseBranch)
|
||||
renderString(g, "main", diff)
|
||||
}()
|
||||
return nil
|
||||
|
@ -327,10 +327,15 @@ func sublimeOpenFile(filename string) (string, error) {
|
||||
return runCommand("subl " + filename)
|
||||
}
|
||||
|
||||
func getBranchDiff(branch string, baseBranch string) (string, error) {
|
||||
func getBranchGraph(branch string, baseBranch string) (string, error) {
|
||||
|
||||
return runCommand("git log -p -30 --color --no-merges " + branch)
|
||||
// return runCommand("git diff --color " + baseBranch + "..." + branch)
|
||||
return runCommand("git log --graph --color --abbrev-commit --decorate --date=relative --pretty=medium " + branch)
|
||||
|
||||
// return runCommand("git log --color --graph --oneline " + branch)
|
||||
|
||||
// Leaving this guy commented out in case there's backlash from the design
|
||||
// change and I want to make this configurable
|
||||
// return runCommand("git log -p -30 --color --no-merges " + branch)
|
||||
}
|
||||
|
||||
func verifyInGitRepo() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user