From: "Sibo Dong via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Sibo Dong <sibo.dong@outlook.com>, Sibo Dong <sibo.dong@outlook.com>
Subject: [PATCH] git-prompt.sh: make `option` a local variable
Date: Sat, 31 Oct 2020 22:09:46 +0000 [thread overview]
Message-ID: <pull.775.git.1604182187195.gitgitgadget@gmail.com> (raw)
From: Sibo Dong <sibo.dong@outlook.com>
Other variables like `key` and `value` are local to this completion
script, so I think the same should be done with `option`.
Signed-off-by: Sibo Dong <sibo.dong@outlook.com>
---
git-prompt.sh: make option a local variable
This is very trivial, but variables like key and value are local to
git-prompt.sh, so I think the same should be done with option. I have
GIT_PS1_SHOW_UPSTREAM set to verbose in my ~/.bashrc, so option gets set
to verbose in my Bash session whenever I change directories to a local
repository with a remote.
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-775%2Fdongsibo%2Ffix-git-prompt-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-775/dongsibo/fix-git-prompt-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/775
contrib/completion/git-prompt.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh
index 16260bab73..5116016d39 100644
--- a/contrib/completion/git-prompt.sh
+++ b/contrib/completion/git-prompt.sh
@@ -137,6 +137,7 @@ __git_ps1_show_upstream ()
done <<< "$output"
# parse configuration values
+ local option
for option in ${GIT_PS1_SHOWUPSTREAM}; do
case "$option" in
git|svn) upstream="$option" ;;
base-commit: 898f80736c75878acc02dc55672317fcc0e0a5a6
--
gitgitgadget
next reply other threads:[~2020-10-31 22:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-31 22:09 Sibo Dong via GitGitGadget [this message]
2020-10-31 22:45 ` [PATCH] git-prompt.sh: make `option` a local variable Junio C Hamano
2020-11-01 8:04 ` Sibo Dong
2020-11-02 20:39 ` Junio C Hamano
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=pull.775.git.1604182187195.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=sibo.dong@outlook.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.