From: "Shupak, Vitaly" <Vitaly.Shupak@deshaw.com>
To: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: BUG: git prompt breaks with zsh < 5.0.6
Date: Mon, 9 Jan 2023 17:12:56 +0000 [thread overview]
Message-ID: <5807cdbe6d66427c9ff45ea78c2c1ffb@deshaw.com> (raw)
A change to git-prompt.sh in v2.38 to show presence of unresolved conflicts contains syntax which is not valid under zsh < 5.0.6. This version of zsh is old, but is still the default on RedHat 7 machines, for example.
The offending block is:
local conflict="" # state indicator for unresolved conflicts
if [[ "${GIT_PS1_SHOWCONFLICTSTATE}" == "yes" ]] &&
[[ $(git ls-files --unmerged 2>/dev/null) ]]; then
conflict="|CONFLICT"
fi
[[ $(command) ]] syntax doesn't work in older version of zsh and should use [[ -n "$(command)" ]] instead.
Thanks,
Vitaly
next reply other threads:[~2023-01-09 17:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-09 17:12 Shupak, Vitaly [this message]
2023-01-09 23:37 ` BUG: git prompt breaks with zsh < 5.0.6 brian m. carlson
2023-01-10 15:15 ` Shupak, Vitaly
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5807cdbe6d66427c9ff45ea78c2c1ffb@deshaw.com \
--to=vitaly.shupak@deshaw.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).