From: D. Ben Knoble Date: Thu, 20 Nov 2025 18:18:40 GMT Subject: Re: [PATCH 3/3] git-prompt: add quiet upstream indicator option Message-ID: In-Reply-To: On Thu, Nov 20, 2025 at 1:06 PM Eric Sunshine wrote: > > On Thu, Nov 20, 2025 at 11:10 AM D. Ben Knoble wrote: > > On Sat, Nov 15, 2025 at 1:55 PM Kiril Ivanov via GitGitGadget > > wrote: > > > diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh > > > @@ -275,6 +279,8 @@ __git_ps1_show_upstream () > > > "0 0") # equal to upstream > > > + [ "$quiet" ] && > > > + upstream="|u" || > > > upstream="|u=" ;; > > > "0 "*) # ahead of upstream > > > upstream="|u+${count#0 }" ;; > > > > Our coding style also prefers "test" to "[". > > In this bash-specific script, the normal project coding style is > relaxed and `[` is used regularly, far more so than `test`, so use of > `[` here is appropriate and consistent with surrounding code. Good to know, thanks! That'll teach me to respond without looking at surrounding context ;) -- D. Ben Knoble