git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] completion: Fixes GIT_PS1_SHOWDIRTYSTATE problems
@ 2009-02-06 15:46 Ted Pavlic
  2009-02-06 15:46 ` [PATCH 1/2] completion: Fix GIT_PS1_SHOWDIRTYSTATE to prevent unbound variable errors Ted Pavlic
  0 siblings, 1 reply; 9+ messages in thread
From: Ted Pavlic @ 2009-02-06 15:46 UTC (permalink / raw)
  To: spearce; +Cc: git, gitster, Ted Pavlic

These two patches correct some problems introduced by the recent
GIT_PS1_SHOWDIRTYSTATE fixes.

The first changes $VAR to ${VAR-} to
prevent the unbound variable errors that were discussed earlier on the
list.

The second changes the GIT_PS1_SHOWDIRTYSTATE documentation from

#(Tab)Text

to

#(7 spaces)Text

to be consistent with the surrounding text.

Ted Pavlic (2):
  completion: Fix GIT_PS1_SHOWDIRTYSTATE to prevent unbound variable
    errors.
  completion: Get rid of tabbed indentation in comments. Replace with
    spaces.

 contrib/completion/git-completion.bash |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/2] completion: Fix GIT_PS1_SHOWDIRTYSTATE to prevent unbound variable errors.
  2009-02-06 15:46 [PATCH 0/2] completion: Fixes GIT_PS1_SHOWDIRTYSTATE problems Ted Pavlic
@ 2009-02-06 15:46 ` Ted Pavlic
  2009-02-06 15:46   ` [PATCH 2/2] completion: Get rid of tabbed indentation in comments. Replace with spaces Ted Pavlic
  0 siblings, 1 reply; 9+ messages in thread
From: Ted Pavlic @ 2009-02-06 15:46 UTC (permalink / raw)
  To: spearce; +Cc: git, gitster, Ted Pavlic

Signed-off-by: Ted Pavlic <ted@tedpavlic.com>
---
 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.319.gbd9e

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/2] completion: Get rid of tabbed indentation in comments. Replace with spaces.
  2009-02-06 15:46 ` [PATCH 1/2] completion: Fix GIT_PS1_SHOWDIRTYSTATE to prevent unbound variable errors Ted Pavlic
@ 2009-02-06 15:46   ` Ted Pavlic
  2009-02-06 15:58     ` Shawn O. Pearce
  0 siblings, 1 reply; 9+ messages in thread
From: Ted Pavlic @ 2009-02-06 15:46 UTC (permalink / raw)
  To: spearce; +Cc: git, gitster, Ted Pavlic

Signed-off-by: Ted Pavlic <ted@tedpavlic.com>
---
 contrib/completion/git-completion.bash |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 6e04985..f44f63c 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -34,11 +34,11 @@
 #       are currently in a git repository.  The %s token will be
 #       the name of the current branch.
 #
-#	In addition, if you set GIT_PS1_SHOWDIRTYSTATE to a nonempty
-#	value, unstaged (*) and staged (+) changes will be shown next
-#	to the branch name.  You can configure this per-repository
-#	with the bash.showDirtyState variable, which defaults to true
-#	once GIT_PS1_SHOWDIRTYSTATE is enabled.
+#       In addition, if you set GIT_PS1_SHOWDIRTYSTATE to a nonempty
+#       value, unstaged (*) and staged (+) changes will be shown next
+#       to the branch name.  You can configure this per-repository
+#       with the bash.showDirtyState variable, which defaults to true
+#       once GIT_PS1_SHOWDIRTYSTATE is enabled.
 #
 # To submit patches:
 #
-- 
1.6.1.2.319.gbd9e

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] completion: Get rid of tabbed indentation in comments. Replace with spaces.
  2009-02-06 15:46   ` [PATCH 2/2] completion: Get rid of tabbed indentation in comments. Replace with spaces Ted Pavlic
@ 2009-02-06 15:58     ` Shawn O. Pearce
  2009-02-06 16:05       ` [PATCH 1/2] completion: Fix GIT_PS1_SHOWDIRTYSTATE to prevent unbound variable errors Ted Pavlic
  0 siblings, 1 reply; 9+ messages in thread
From: Shawn O. Pearce @ 2009-02-06 15:58 UTC (permalink / raw)
  To: Ted Pavlic; +Cc: git, gitster

Ted Pavlic <ted@tedpavlic.com> wrote:
> Signed-off-by: Ted Pavlic <ted@tedpavlic.com>

Both patches,

Trivially-acked-by: Shawn O. Pearce <spearce@spearce.org>


> ---
>  contrib/completion/git-completion.bash |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index 6e04985..f44f63c 100755
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -34,11 +34,11 @@
>  #       are currently in a git repository.  The %s token will be
>  #       the name of the current branch.
>  #
> -#	In addition, if you set GIT_PS1_SHOWDIRTYSTATE to a nonempty
> -#	value, unstaged (*) and staged (+) changes will be shown next
> -#	to the branch name.  You can configure this per-repository
> -#	with the bash.showDirtyState variable, which defaults to true
> -#	once GIT_PS1_SHOWDIRTYSTATE is enabled.
> +#       In addition, if you set GIT_PS1_SHOWDIRTYSTATE to a nonempty
> +#       value, unstaged (*) and staged (+) changes will be shown next
> +#       to the branch name.  You can configure this per-repository
> +#       with the bash.showDirtyState variable, which defaults to true
> +#       once GIT_PS1_SHOWDIRTYSTATE is enabled.
>  #
>  # To submit patches:
>  #
> -- 
> 1.6.1.2.319.gbd9e
> 

-- 
Shawn.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/2] completion: Fix GIT_PS1_SHOWDIRTYSTATE to prevent unbound variable errors.
  2009-02-06 15:58     ` Shawn O. Pearce
@ 2009-02-06 16:05       ` Ted Pavlic
  2009-02-06 16:05         ` [PATCH 2/2] completion: Get rid of tabbed indentation in comments. Replace with spaces Ted Pavlic
  0 siblings, 1 reply; 9+ messages in thread
From: Ted Pavlic @ 2009-02-06 16:05 UTC (permalink / raw)
  To: spearce; +Cc: git, gitster, Ted Pavlic

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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/2] completion: Get rid of tabbed indentation in comments. Replace with spaces.
  2009-02-06 16:05       ` [PATCH 1/2] completion: Fix GIT_PS1_SHOWDIRTYSTATE to prevent unbound variable errors Ted Pavlic
@ 2009-02-06 16:05         ` Ted Pavlic
  2009-02-06 16:13           ` Shawn O. Pearce
  0 siblings, 1 reply; 9+ messages in thread
From: Ted Pavlic @ 2009-02-06 16:05 UTC (permalink / raw)
  To: spearce; +Cc: git, gitster, Ted Pavlic

Signed-off-by: Ted Pavlic <ted@tedpavlic.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
---
 contrib/completion/git-completion.bash |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 6e04985..f44f63c 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -34,11 +34,11 @@
 #       are currently in a git repository.  The %s token will be
 #       the name of the current branch.
 #
-#	In addition, if you set GIT_PS1_SHOWDIRTYSTATE to a nonempty
-#	value, unstaged (*) and staged (+) changes will be shown next
-#	to the branch name.  You can configure this per-repository
-#	with the bash.showDirtyState variable, which defaults to true
-#	once GIT_PS1_SHOWDIRTYSTATE is enabled.
+#       In addition, if you set GIT_PS1_SHOWDIRTYSTATE to a nonempty
+#       value, unstaged (*) and staged (+) changes will be shown next
+#       to the branch name.  You can configure this per-repository
+#       with the bash.showDirtyState variable, which defaults to true
+#       once GIT_PS1_SHOWDIRTYSTATE is enabled.
 #
 # To submit patches:
 #
-- 
1.6.1.2.390.gba743

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] completion: Get rid of tabbed indentation in comments. Replace with spaces.
  2009-02-06 16:05         ` [PATCH 2/2] completion: Get rid of tabbed indentation in comments. Replace with spaces Ted Pavlic
@ 2009-02-06 16:13           ` Shawn O. Pearce
  2009-02-06 16:19             ` Ted Pavlic
  2009-02-06 23:32             ` Thomas Rast
  0 siblings, 2 replies; 9+ messages in thread
From: Shawn O. Pearce @ 2009-02-06 16:13 UTC (permalink / raw)
  To: Ted Pavlic; +Cc: git, gitster

Ted Pavlic <ted@tedpavlic.com> wrote:
> Signed-off-by: Ted Pavlic <ted@tedpavlic.com>
> Acked-by: Shawn O. Pearce <spearce@spearce.org>

Heh.

I expected Junio to use my TAB line as-is.  I find them amusing.
Plus, I didn't actually apply your patches and test them.  They
just looked right to me.  Usually Acked-by is applied only if you
actually ran the code and verified it does what the message claims.
Trivially-acked-by is a bit less strict.

Whatever.  These are really trivial patches.  Whatever Junio
applies here is fine.

Thanks for fixing that ${X-} thing.  I clearly missed it on the
review of the ps1 stuff.

-- 
Shawn.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] completion: Get rid of tabbed indentation in comments. Replace with spaces.
  2009-02-06 16:13           ` Shawn O. Pearce
@ 2009-02-06 16:19             ` Ted Pavlic
  2009-02-06 23:32             ` Thomas Rast
  1 sibling, 0 replies; 9+ messages in thread
From: Ted Pavlic @ 2009-02-06 16:19 UTC (permalink / raw)
  To: Shawn O. Pearce; +Cc: git, gitster

> I expected Junio to use my TAB line as-is.  I find them amusing.

Oops. :( In the future, I'll leave such things as is. I just figured the 
"Trivially" was a side comment, but the function was still the same.

> Thanks for fixing that ${X-} thing.  I clearly missed it on the
> review of the ps1 stuff.

I would have missed it myself... but then after I did a git pull, I was 
getting a bash error on every single prompt. That was annoying. :)

Thanks --
Ted


-- 
Ted Pavlic <ted@tedpavlic.com>

   Please visit my ALS association page:
         http://web.alsa.org/goto/tedpavlic
   My family appreciates your support in the fight to defeat ALS.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] completion: Get rid of tabbed indentation in comments. Replace with spaces.
  2009-02-06 16:13           ` Shawn O. Pearce
  2009-02-06 16:19             ` Ted Pavlic
@ 2009-02-06 23:32             ` Thomas Rast
  1 sibling, 0 replies; 9+ messages in thread
From: Thomas Rast @ 2009-02-06 23:32 UTC (permalink / raw)
  To: Ted Pavlic; +Cc: Shawn O. Pearce, git, gitster

[-- Attachment #1: Type: text/plain, Size: 329 bytes --]

Shawn O. Pearce wrote:
> 
> Thanks for fixing that ${X-} thing.  I clearly missed it on the
> review of the ps1 stuff.

Sorry for not thinking of that, I actually remember the thread around
the original ${X-} cleanup...

For extra sillyness you could also add my Ack ;-)

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-02-06 23:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-06 15:46 [PATCH 0/2] completion: Fixes GIT_PS1_SHOWDIRTYSTATE problems Ted Pavlic
2009-02-06 15:46 ` [PATCH 1/2] completion: Fix GIT_PS1_SHOWDIRTYSTATE to prevent unbound variable errors Ted Pavlic
2009-02-06 15:46   ` [PATCH 2/2] completion: Get rid of tabbed indentation in comments. Replace with spaces Ted Pavlic
2009-02-06 15:58     ` Shawn O. Pearce
2009-02-06 16:05       ` [PATCH 1/2] completion: Fix GIT_PS1_SHOWDIRTYSTATE to prevent unbound variable errors Ted Pavlic
2009-02-06 16:05         ` [PATCH 2/2] completion: Get rid of tabbed indentation in comments. Replace with spaces Ted Pavlic
2009-02-06 16:13           ` Shawn O. Pearce
2009-02-06 16:19             ` Ted Pavlic
2009-02-06 23:32             ` Thomas Rast

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).