git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Khinshan Khan <khanshan501@gmail.com>
To: git@vger.kernel.org
Cc: Khinshan Khan <khanshan501@gmail.com>
Subject: [PATCH] Move upstream status from gitstring to f
Date: Thu, 25 Oct 2018 10:21:25 -0400	[thread overview]
Message-ID: <1540477285-18308-1-git-send-email-khanshan501@gmail.com> (raw)

Upstream status should be spaced even if other statuses don't exist
for consistency of view. Eg: if a repository is freshly cloned, the
prompt shows "(master=)" but with an additional status like a change,
it'll show "(master *=)". Now it'll show "(master =)" and accounts for
other states as well.

Signed-off-by: Khinshan Khan <khanshan501@gmail.com>
---
 contrib/completion/git-prompt.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh
index 983e419..4715d33 100644
--- a/contrib/completion/git-prompt.sh
+++ b/contrib/completion/git-prompt.sh
@@ -517,8 +517,8 @@ __git_ps1 ()
 		b="\${__git_ps1_branch_name}"
 	fi
 
-	local f="$w$i$s$u"
-	local gitstring="$c$b${f:+$z$f}$r$p"
+	local f="$w$i$s$u$p"
+	local gitstring="$c$b${f:+$z$f}$r"
 
 	if [ $pcmode = yes ]; then
 		if [ "${__git_printf_supports_v-}" != yes ]; then
-- 
2.7.4


                 reply	other threads:[~2018-10-25 14:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1540477285-18308-1-git-send-email-khanshan501@gmail.com \
    --to=khanshan501@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).