mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-03-05 20:49:04 -08:00
fix(kraken): only use first root commit
This commit is contained in:
parent
a9e2ba61fa
commit
d3272faedd
|
@ -244,6 +244,10 @@ func (g *Git) StashCount() int {
|
||||||
|
|
||||||
func (g *Git) Kraken() string {
|
func (g *Git) Kraken() string {
|
||||||
root := g.getGitCommandOutput("rev-list", "--max-parents=0", "HEAD")
|
root := g.getGitCommandOutput("rev-list", "--max-parents=0", "HEAD")
|
||||||
|
if strings.Contains(root, "\n") {
|
||||||
|
root = strings.Split(root, "\n")[0]
|
||||||
|
}
|
||||||
|
|
||||||
if len(g.RawUpstreamURL) == 0 {
|
if len(g.RawUpstreamURL) == 0 {
|
||||||
if len(g.Upstream) == 0 {
|
if len(g.Upstream) == 0 {
|
||||||
g.Upstream = "origin"
|
g.Upstream = "origin"
|
||||||
|
|
Loading…
Reference in a new issue