<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -28,31 +28,16 @@ class PushController &lt; ApplicationController
 		local_path = &quot;/home/tekkub/temp/#{local_repo}&quot;
 
 		if !File.exist?(local_path)
-			puts &quot;\n---Cloning #{source_repo}\n&quot;
-			#~ system &quot;echo 'Cloning from github:#{github_repo} to local:#{repo}' &gt;&gt; /home/tekkub/temp/githubcatcher.log&quot;
-			#~ system &quot;cd /home/tekkub/temp &amp;&amp; git clone --bare #{source_repo} #{local_repo}&quot;
-			system &quot;cd /home/tekkub/temp &amp;&amp; git clone #{source_repo} #{local_repo}&quot;
-			puts &quot;\n---Add remote\n&quot;
-			#~ system &quot;cd #{local_path} &amp;&amp; git remote add github #{dest_repo}&quot;
-			system &quot;cd #{local_path} &amp;&amp; git remote add mirror #{dest_repo}&quot;
+			system &quot;cd /home/tekkub/temp &amp;&amp; mkdir #{local_repo}&quot;
+			system &quot;cd #{local_path} &amp;&amp; git-init&quot;
+			system &quot;cd #{local_path} &amp;&amp; git-config core.bare true&quot;
+			system &quot;cd #{local_path} &amp;&amp; git-remote add --mirror -f origin #{source_repo}&quot;
+			system &quot;cd #{local_path} &amp;&amp; git-remote add -f mirror #{dest_repo}&quot;
 		end
 
-		branches = IO.popen(&quot;cd #{local_path} &amp;&amp; git branch -r&quot;).readlines
-		branches &lt;&lt; &quot;origin/#{branch}&quot;
-		branches = branches.uniq.map {|l| l.strip.split(&quot;/&quot;)}.reject! {|l| l[0] == &quot;mirror&quot; || l[1] == &quot;HEAD&quot;}.map {|l| &quot;+#{l[1]}:#{l[1]}&quot;}
-		p &quot;git pull origin &quot; + branches.join(&quot; &quot;)
-
-		puts &quot;\n---Pull #{source_repo} #{branch}\n&quot;
-		system &quot;cd #{local_path} &amp;&amp; git pull origin #{branches.join(&quot; &quot;)}&quot;
-		#~ system &quot;cd #{local_path} &amp;&amp; git pull origin&quot;
-		#~ system &quot;cd #{local_path} &amp;&amp; git pull mirror&quot;
-		#~ system &quot;cd #{local_path} &amp;&amp; git branch -f temp remotes/github/#{branch}&quot;
-		#~ system &quot;echo 'Mirroring from github:#{github_repo} to #{repo}' &gt;&gt; /home/tekkub/temp/githubcatcher.log&quot;
-		puts &quot;\n---Push #{dest_repo} #{branch}\n&quot;
-		#~ system &quot;cd #{local_path} &amp;&amp; git push --tags --force mirror temp:#{branch}&quot;
-		system &quot;cd #{local_path} &amp;&amp; git push --mirror mirror&quot;
-
-		puts &quot;\n---Finished #{source_repo} --&gt; #{dest_repo}\n&quot;
+		system &quot;cd #{local_path} &amp;&amp; git-fetch origin&quot;
+		system &quot;cd #{local_path} &amp;&amp; git-fetch mirror&quot;
+		system &quot;cd #{local_path} &amp;&amp; git-push --mirror mirror&quot;
 	end
 
 end</diff>
      <filename>app/controllers/push_controller.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>cf1746da76cc46b241faa408645c630f651f1cd6</id>
    </parent>
  </parents>
  <author>
    <name>Tekkub</name>
    <email>tekkub@gmail.com</email>
  </author>
  <url>http://github.com/tekkub/github_catcher/commit/49659064f6922d73a489b8d0320c515b5a67d8bb</url>
  <id>49659064f6922d73a489b8d0320c515b5a67d8bb</id>
  <committed-date>2008-04-09T17:28:56-07:00</committed-date>
  <authored-date>2008-04-09T17:16:30-07:00</authored-date>
  <message>Got mirroring working, for realsies</message>
  <tree>70ff73a01d7c40132122f2c904c141ca821c2113</tree>
  <committer>
    <name>Tekkub</name>
    <email>tekkub@gmail.com</email>
  </committer>
</commit>
