Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH] vcs_info bzr: Fix typo in constant name



---
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