<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/braid/commands/push.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -107,39 +107,41 @@ Main {
     }
   }
 
-  mode(:setup) {
+  mode(:diff) {
     description &lt;&lt;-TXT
-      Set up git or git-svn remote for a mirror.
-      All commands that need a remote run setup internally.
-
-      Defaults to setting up remotes for all mirrors if none is specified.
+      Show diff of local changes to mirror.
     TXT
 
-    examples &lt;&lt;-TXT
-      . braid setup local/dir
+    mixin :argument_path, :option_verbose
+
+    run {
+      Braid::Command.run(:diff, path)
+    }
+  }
+
+  mode(:push) {
+    description &lt;&lt;-TXT
+      Push local mirror changes to remote.
     TXT
 
-    mixin :optional_path, :option_verbose
+    mixin :argument_path, :option_verbose
 
     run {
       Braid.verbose = verbose
-      Braid::Command.run(:setup, path)
+      Braid::Command.run(:push, path)
     }
   }
 
-  mode(:diff) {
+  mode(:setup) {
     description &lt;&lt;-TXT
-      Show diff of local changes to mirror.
+      Set up git and git-svn remotes.
     TXT
 
-    examples &lt;&lt;-TXT
-      . braid diff local/dir
-    TXT
-
-    mixin :argument_path, :option_verbose
+    mixin :optional_path, :option_verbose
 
     run {
-      Braid::Command.run(:diff, path)
+      Braid.verbose = verbose
+      Braid::Command.run(:setup, path)
     }
   }
 </diff>
      <filename>bin/braid</filename>
    </modified>
    <modified>
      <diff>@@ -59,7 +59,7 @@ module Braid
           begin
             if mirror.squashed?
               local_hash = git.rev_parse(&quot;HEAD&quot;)
-              if diff
+              if !diff.empty?
                 base_hash = generate_tree_hash(mirror, base_revision)
               else
                 base_hash = local_hash</diff>
      <filename>lib/braid/commands/update.rb</filename>
    </modified>
    <modified>
      <diff>@@ -86,7 +86,7 @@ module Braid
     def diff
       remote_hash = git.rev_parse(&quot;#{base_revision}:&quot;)
       local_hash = git.tree_hash(path)
-      remote_hash != local_hash ? git.diff_tree(remote_hash, local_hash, path) : &quot;&quot;
+      remote_hash != local_hash ? git.diff_tree(remote_hash, local_hash) : &quot;&quot;
     end
 
     def fetch</diff>
      <filename>lib/braid/mirror.rb</filename>
    </modified>
    <modified>
      <diff>@@ -139,12 +139,16 @@ module Braid
 
     class Git &lt; Proxy
       def commit(message, *args)
-
-        commit_message_file = Tempfile.new(&quot;braid_commit&quot;, &quot;.&quot;)
-        commit_message_file.print(&quot;Braid: &quot; + message)
-        commit_message_file.flush
-        status, out, err = exec(&quot;git commit -F #{commit_message_file.path} --no-verify #{args.join(' ')}&quot;)
-        commit_message_file.unlink
+        cmd = &quot;git commit --no-verify&quot;
+        if message # allow nil
+          message_file = Tempfile.new(&quot;braid_commit&quot;)
+          message_file.print(message)
+          message_file.flush
+          cmd &lt;&lt; &quot; -F #{message_file.path}&quot;
+        end
+        cmd &lt;&lt; &quot; #{args.join(' ')}&quot; unless args.empty?
+        status, out, err = exec(cmd)
+        message_file.unlink if message_file
 
         if status == 0
           true
@@ -155,10 +159,10 @@ module Braid
         end
       end
 
-      def fetch(remote = nil)
-        args = remote &amp;&amp; &quot;-n #{remote}&quot;
+      def fetch(remote = nil, *args)
+        args.unshift &quot;-n #{remote}&quot; if remote
         # open4 messes with the pipes of index-pack
-        sh(&quot;git fetch #{args} 2&gt;&amp;1 &gt;/dev/null&quot;)
+        sh(&quot;git fetch #{args.join(' ')} 2&gt;&amp;1 &gt;/dev/null&quot;)
       end
 
       def checkout(treeish)</diff>
      <filename>lib/braid/operations.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>1b35d9964005d810e48644078844414a3bdd8c82</id>
    </parent>
  </parents>
  <author>
    <name>Norbert Crombach</name>
    <email>norbert.crombach@primetheory.org</email>
  </author>
  <url>http://github.com/norbert/braid/commit/a2e1320da49f661e8f3eaca25eb0e3a11da9d42d</url>
  <id>a2e1320da49f661e8f3eaca25eb0e3a11da9d42d</id>
  <committed-date>2009-03-07T23:28:14-08:00</committed-date>
  <authored-date>2008-11-13T14:22:58-08:00</authored-date>
  <message>Oh snap, push works</message>
  <tree>79fc6391cad8547e009eb7c0b5da4c60fcf2a573</tree>
  <committer>
    <name>Norbert Crombach</name>
    <email>norbert.crombach@primetheory.org</email>
  </committer>
</commit>
