Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] vcs_info bzr: Fix typo in constant name
- X-seq: zsh-workers 32507
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] vcs_info bzr: Fix typo in constant name
- Date: Sat, 29 Mar 2014 09:47:50 +0000
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=date:from:to:subject:message-id :mime-version:content-type; s=mesmtp; bh=8YtEeqmzB44uoAg9VnxXkrQ GzeU=; b=cP+O2GENdrZla0GTZJ4PtesJPVz1FKmXhpu7WCKw4DCkOvf5izMrcrK NjpblRt/F0gM+mOvbkE6YxjwJu9gQeTWfUQe4cKcW7S2FpB5V0vW+V8BYw0nVbHs FMgm7imtVL868/CgmJ0qmqwET5tumIVDWcndtTMC+/D0GPm0mwhc=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:to:subject:message-id :mime-version:content-type; s=smtpout; bh=8YtEeqmzB44uoAg9VnxXkr QGzeU=; b=DuiMTOM5xUtoyKmKsj0+XH+7DizvrKG7cRI5QaNYd3yp+p63TbaBmU 6GEwi0pgqpozhSVY8npGblPy3nWrtDWKJjeh2L5XbpmMy0s5XUi6OeojnkVh+f0c AoQgL247fJ7g5aneYWYp1hEel24kBK4RKhy3YxaQXAZlnbKmVRkag=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
---
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author