<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -54,7 +54,7 @@ Main {
     mixin :argument_url, :option_type, :optional_path, :option_branch, :option_rails_plugin, :option_revision, :option_full, :option_verbose
 
     run {
-      Braid::Operations::VERBOSE = verbose
+      Braid.verbose = verbose
       Braid::Command.run(:add, url, { &quot;type&quot; =&gt; type, &quot;path&quot; =&gt; path, &quot;branch&quot; =&gt; branch, &quot;rails_plugin&quot; =&gt; rails_plugin, &quot;revision&quot; =&gt; revision, &quot;full&quot; =&gt; full })
     }
   }
@@ -78,7 +78,7 @@ Main {
     mixin :optional_path, :option_revision, :option_head, :option_safe, :option_verbose
 
     run {
-      Braid::Operations::VERBOSE = verbose
+      Braid.verbose = verbose
       Braid::Command.run(:update, path, { &quot;revision&quot; =&gt; revision, &quot;head&quot; =&gt; head , &quot;safe&quot; =&gt; safe })
     }
   }
@@ -99,7 +99,7 @@ Main {
     mixin :argument_path, :option_verbose
 
     run {
-      Braid::Operations::VERBOSE = verbose
+      Braid.verbose = verbose
       Braid::Command.run(:remove, path)
     }
   }
@@ -116,7 +116,7 @@ Main {
     mixin :optional_path, :option_verbose
 
     run {
-      Braid::Operations::VERBOSE = verbose
+      Braid.verbose = verbose
       Braid::Command.run(:setup, path)
     }
   }
@@ -133,7 +133,6 @@ Main {
     mixin :argument_path, :option_verbose
 
     run {
-      Braid::Operations::VERBOSE = verbose
       Braid::Command.run(:diff, path)
     }
   }</diff>
      <filename>bin/braid</filename>
    </modified>
    <modified>
      <diff>@@ -8,6 +8,9 @@ module Braid
   LOCAL_CACHE_DIR = ENV[&quot;BRAID_LOCAL_CACHE_DIR&quot;] || &quot;#{ENV[&quot;HOME&quot;]}/.braid/cache/&quot;
   REQUIRED_GIT_VERSION = &quot;1.6&quot;
 
+  def self.verbose; @verbose || false; end
+  def self.verbose=(new_value); @verbose = !!new_value; end
+
   class BraidError &lt; StandardError
     def message
       value = super</diff>
      <filename>lib/braid.rb</filename>
    </modified>
    <modified>
      <diff>@@ -49,7 +49,6 @@ module Braid
       include Singleton
 
       def self.command; name.split('::').last.downcase; end # hax!
-      def self.verbose; Braid::Operations::VERBOSE ; end
 
       def version
         status, out, err = exec!(&quot;#{self.class.command} --version&quot;)
@@ -103,7 +102,7 @@ module Braid
           ENV['LANG'] = 'C'
 
           out, err = nil
-          puts &quot;executing cmd(#{cmd})&quot; if Proxy.verbose
+          log(cmd)
           status = Open4.popen4(cmd) do |pid, stdin, stdout, stderr|
             out = stdout.read
             err = stderr.read
@@ -120,10 +119,25 @@ module Braid
           [status, out, err]
         end
 
+        def sh(cmd, message = nil)
+          message ||= &quot;could not fetch&quot; if cmd =~ /fetch/
+          log(cmd)
+          system(cmd)
+          raise ShellExecutionError, message unless $? == 0
+          true
+        end
+
         def msg(str)
           puts str
         end
 
+        def log(cmd)
+          msg &quot;Executing `#{cmd}`&quot; if verbose?
+        end
+
+        def verbose?
+          Braid.verbose
+        end
     end
 
     class Git &lt; Proxy
@@ -141,9 +155,7 @@ module Braid
 
       def fetch(remote)
         # open4 messes with the pipes of index-pack
-        system(&quot;git fetch -n #{remote} 2&gt;&amp;1 &gt;/dev/null&quot;)
-        raise ShellExecutionError, &quot;could not fetch&quot; unless $? == 0
-        true
+        sh(&quot;git fetch -n #{remote} 2&gt;&amp;1 &gt;/dev/null&quot;)
       end
 
       def checkout(treeish)
@@ -265,10 +277,7 @@ module Braid
       end
 
       def fetch(remote)
-        # open4 messes with the pipes of index-pack
-        system(&quot;git svn fetch #{remote} 2&gt;&amp;1 &gt;/dev/null&quot;)
-        raise ShellExecutionError, &quot;could not fetch&quot; unless $? == 0
-        true
+        sh(&quot;git svn fetch #{remote} 2&gt;&amp;1 &gt;/dev/null&quot;)
       end
 
       def init(remote, path)</diff>
      <filename>lib/braid/operations.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>7ef0cf37612e38b0b8db03383b6191663ddb8f8b</id>
    </parent>
  </parents>
  <author>
    <name>Norbert Crombach</name>
    <email>norbert.crombach@primetheory.org</email>
  </author>
  <url>http://github.com/norbert/braid/commit/08d9ae50c64bdfac85e40aa3ae57c4e25358a46a</url>
  <id>08d9ae50c64bdfac85e40aa3ae57c4e25358a46a</id>
  <committed-date>2008-10-22T14:47:13-07:00</committed-date>
  <authored-date>2008-09-30T08:09:18-07:00</authored-date>
  <message>Put verbose setting where it belongs</message>
  <tree>3d52a17932238f9d72ba883ab625db3f37798848</tree>
  <committer>
    <name>Norbert Crombach</name>
    <email>norbert.crombach@primetheory.org</email>
  </committer>
</commit>
