From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Subject: [PATCH] vcs_info bzr: Fix typo in constant name
Date: Sat, 29 Mar 2014 09:47:50 +0000 [thread overview]
Message-ID: <20140329094750.GA11569@tarsus.local2> (raw)
---
A quick patch to fix a typo in a string constant. The code isn't wrong
(all references to the constant spell it the same way), but it's
fragile: someone is liable to spell "lightweight" _correctly_ when
extending the code --- which would be a misspelling of the actual
constant.
I haven't tested this, but I think it's fine.
Daniel
(Now I wonder if there's a zsh plugin for proper enum-typed variables...)
Functions/VCS_Info/Backends/VCS_INFO_get_data_bzr | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_bzr b/Functions/VCS_Info/Backends/VCS_INFO_get_data_bzr
index cae1a3b..6e96ece 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_bzr
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_bzr
@@ -24,7 +24,7 @@ VCS_INFO_bzr_get_info_restricted() {
# we are forbidden from fetching info on bound branch from remote repository
bzrinfo=( $(${vcs_comm[cmd]} revno) ${bzrbase:t} )
if zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}" "check-for-changes" && \
- [[ ! $bzr_type == lightweigth ]]
+ [[ ! $bzr_type == lightweight ]]
then
VCS_INFO_bzr_get_changes
fi
@@ -46,7 +46,7 @@ VCS_INFO_bzr_get_changes() {
}
if zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}" "use-simple" ; then
- # simple parsing will fail to fetch information from lightweigth checkouts
+ # simple parsing will fail to fetch information from lightweight checkouts
bzrbase=${vcs_comm[basedir]}
bzrinfo[2]=${bzrbase:t}
if [[ -f ${bzrbase}/.bzr/branch/last-revision ]] ; then
@@ -74,7 +74,7 @@ else
bzr_type=checkout
bzrbase=${bzr_info[repository_checkout_root]} ;;
('Lightweight checkout'*)
- bzr_type=lightweigth
+ bzr_type=lightweight
bzrbase=${bzr_info[light_checkout_root]} ;;
(*)
bzr_type=standalone
--
1.7.10.4
reply other threads:[~2014-03-29 9:59 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=20140329094750.GA11569@tarsus.local2 \
--to=d.s@daniel.shahaf.name \
--cc=zsh-workers@zsh.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://git.vuxu.org/mirror/zsh/
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).