git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/2] completion: Fix GIT_PS1_SHOWDIRTYSTATE to prevent unbound variable errors.

From
Ted Pavlic <ted@tedpavlic.com>
Date
Feb 6, 2009, 16:05 UTC
Message-ID
<1233936338-10679-1-git-send-email-ted@tedpavlic.com>
In-Reply-To
<20090206155823.GO26880@spearce.org>
Signed-off-by: Ted Pavlic <ted@tedpavlic.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
---
 contrib/completion/git-completion.bash |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 307bf5d..6e04985 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -125,7 +125,7 @@ __git_ps1 ()
 		local w
 		local i
 
-		if test -n "$GIT_PS1_SHOWDIRTYSTATE"; then
+		if test -n "${GIT_PS1_SHOWDIRTYSTATE-}"; then
 			if test "$(git config --bool bash.showDirtyState)" != "false"; then
 				git diff --no-ext-diff --ignore-submodules \
 					--quiet --exit-code || w="*"
-- 
1.6.1.2.390.gba743
Previous: Shawn O. PearceNext: Ted Pavlic
Message 5 of 9 in “completion: Fixes GIT_PS1_SHOWDIRTYSTATE problems”
  1. 0/2 completion: Fixes GIT_PS1_SHOWDIRTYSTATE problemsTed Pavlic, Feb 6, 2009
  2. 1/2 completion: Fix GIT_PS1_SHOWDIRTYSTATE to prevent unbound variable errors.Ted Pavlic, Feb 6, 2009
  3. 2/2 completion: Get rid of tabbed indentation in comments. Replace with spaces.Ted Pavlic, Feb 6, 2009
  4. Shawn O. PearceFeb 6, 2009
  5. 1/2 completion: Fix GIT_PS1_SHOWDIRTYSTATE to prevent unbound variable errors.Ted Pavlic, Feb 6, 2009
  6. 2/2 completion: Get rid of tabbed indentation in comments. Replace with spaces.Ted Pavlic, Feb 6, 2009
  7. Shawn O. PearceFeb 6, 2009
  8. Ted PavlicFeb 6, 2009
  9. Thomas RastFeb 6, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.