bash-git-prompt
bash-git-prompt copied to clipboard
GIT_PROMPT_IGNORE_STASH ignored
There appears to be a configuration option GIT_PROMPT_IGNORE_STASH handled in gitprompt.sh. However it has no effect. It looks like __GIT_PROMPT_IGNORE_STASH is set from it, but this variable is never passed to gitstatus.sh, so the logic for handling it there never applies.
Is there any reason we shouldn't do this?
diff --git a/gitprompt.sh b/gitprompt.sh
index 8f3a45d..556d50b 100755
--- a/gitprompt.sh
+++ b/gitprompt.sh
@@ -487,7 +487,7 @@ function updatePrompt() {
git_prompt_config
- __GIT_PROMPT_IGNORE_STASH="${GIT_PROMPT_IGNORE_STASH:-0}"
+ export __GIT_PROMPT_IGNORE_STASH="${GIT_PROMPT_IGNORE_STASH:-0}"
__GIT_PROMPT_SHOW_UPSTREAM="${GIT_PROMPT_SHOW_UPSTREAM:-0}"
__GIT_PROMPT_IGNORE_SUBMODULES="${GIT_PROMPT_IGNORE_SUBMODULES:-0}"
__GIT_PROMPT_WITH_USERNAME_AND_REPO="${GIT_PROMPT_WITH_USERNAME_AND_REPO:-0}"
That seems to fix it for me.
The same appears to apply to __GIT_PROMPT_IGNORE_SUBMODULES and __GIT_PROMPT_WITH_USERNAME_AND_REPO but I haven't tested them yet.
I found the same issue. Adding export fixed the issue, as it didn't initially work with GIT_PROMPT_IGNORE_STASH=1 alone.