bc7bc74469ee5e412ae54c45ebaa5e07295323c5

Author
Marc Cornellà <hello@mcornella.com>
Committer
Marc Cornellà <hello@mcornella.com>
Date

Message

fix(git-prompt): fix clean prompt when stash is not empty (#9978)

Fixes #9978

Diff

 1diff --git a/plugins/git-prompt/README.md b/plugins/git-prompt/README.md
 2index c6610fa94446411c60ddefd0bd6ba71e8f8a251d..83d365c84f02ae03258f894ed23c7678ccb18669 100644
 3--- a/plugins/git-prompt/README.md
 4+++ b/plugins/git-prompt/README.md
 5@@ -11,7 +11,8 @@ plugins=(... git-prompt)
 6 
 7 See the [original repository](https://github.com/olivierverdier/zsh-git-prompt).
 8 
 9-## Prerequisites
10+## Requirements
11+
12 This plugin uses `python`, so your host needs to have it installed
13 
14 ## Examples
15@@ -30,7 +31,7 @@ The prompt may look like the following:
16 
17 By default, the general appearance of the prompt is:
18 
19-```
20+```text
21 (<branch><branch tracking>|<local status>)
22 ```
23 
24@@ -58,9 +59,8 @@ The symbols are as follows:
25 ## Customisation
26 
27 - Set the variable `ZSH_THEME_GIT_PROMPT_CACHE` to any value in order to enable caching.
28-- You may also change a number of variables (whose name start with `ZSH_THEME_GIT_PROMPT_`) 
29+- You may also change a number of variables (whose name start with `ZSH_THEME_GIT_PROMPT_`)
30   to change the appearance of the prompt. Take a look at the bottom of the [plugin file](git-prompt.plugin.zsh)`
31   to see what variables are available.
32 
33-
34 **Enjoy!**
35diff --git a/plugins/git-prompt/gitstatus.py b/plugins/git-prompt/gitstatus.py
36index 786274a71bb667d11ce10e5cec7284ead16f8e18..4dea8000f19e5eb0c494d25d5e44cfd1a1d7b740 100644
37--- a/plugins/git-prompt/gitstatus.py
38+++ b/plugins/git-prompt/gitstatus.py
39@@ -81,7 +81,7 @@ for st in status:
40             staged.append(st)
41 
42 stashed = get_stash()
43-if not changed and not staged and not conflicts and not untracked and not stashed:
44+if not changed and not staged and not conflicts and not untracked:
45     clean = 1
46 else:
47     clean = 0