zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] vcs_info bzr: Fix typo in constant name
@ 2014-03-29  9:47 Daniel Shahaf
  0 siblings, 0 replies; only message in thread
From: Daniel Shahaf @ 2014-03-29  9:47 UTC (permalink / raw)
  To: zsh-workers

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-03-29  9:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-29  9:47 [PATCH] vcs_info bzr: Fix typo in constant name Daniel Shahaf

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