mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-01-13 12:17:26 -08:00
fix: untracked is working area only
This commit is contained in:
parent
c41866171d
commit
36b58abdf3
|
@ -316,7 +316,9 @@ func (g *git) parseGitStats(output []string, working bool) *gitStatus {
|
|||
}
|
||||
switch code {
|
||||
case "?":
|
||||
status.untracked++
|
||||
if working {
|
||||
status.untracked++
|
||||
}
|
||||
case "D":
|
||||
status.deleted++
|
||||
case "A":
|
||||
|
|
|
@ -330,7 +330,7 @@ func TestParseGitStatsStaging(t *testing.T) {
|
|||
assert.Equal(t, 0, status.unmerged)
|
||||
assert.Equal(t, 1, status.added)
|
||||
assert.Equal(t, 2, status.deleted)
|
||||
assert.Equal(t, 1, status.untracked)
|
||||
assert.Equal(t, 0, status.untracked)
|
||||
assert.True(t, status.changed)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue