<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -80,3 +80,5 @@ Concerns
             from ./subversion_log_parser.rb:7:in `parse'
             ...
 
+
+Implement Git#clean_checkout(revision) as &quot;git clean -d &lt;revision.number&gt;&quot;  
\ No newline at end of file</diff>
      <filename>doc/tasks.txt</filename>
    </modified>
    <modified>
      <diff>@@ -30,7 +30,7 @@ module SourceControl
       end
 
       if revision
-        git(&quot;reset&quot;, revision.number)
+        git(&quot;reset&quot;, ['--hard', revision.number])
       end
     end
 </diff>
      <filename>lib/source_control/git.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@ module SourceControl
     class LogParser
 
       def parse(log)
-        return [Git::Revision.new]
+        return [Git::Revision.new(nil, nil, nil)]
       end
 
     end</diff>
      <filename>lib/source_control/git/log_parser.rb</filename>
    </modified>
    <modified>
      <diff>@@ -6,7 +6,7 @@ module SourceControl
 
       attr_reader :number, :committed_by, :time 
 
-      def initiailize(number, committed_by, time)
+      def initialize(number, committed_by, time)
         @number, @committed_by, @time = number, committed_by, time
       end
 </diff>
      <filename>lib/source_control/git/revision.rb</filename>
    </modified>
    <modified>
      <diff>@@ -14,7 +14,7 @@ committer Alexey Verkhovsky &lt;alexey.verkhovsky@gmail.com&gt; 1209921867 -0600
 EOF
 
     def test_parse_should_work
-      expected_revision = Git::Revision.new
+      expected_revision = Git::Revision.new('87a24d3447605e9b07c4ffcf408f14a48d558cfd', 'You', Time.at(0))
       revisions = Git::LogParser.new.parse(SIMPLE_LOG_ENTRY)
       assert_equal [expected_revision], revisions
     end</diff>
      <filename>test/unit/source_control/git/log_parser_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -6,6 +6,54 @@ class SourceControl::GitTest &lt; Test::Unit::TestCase
   include FileSandbox
   include SourceControl
 
+  def test_checkout_with_revision_given
+    in_sandbox do
+      git = new_git(:repository =&gt; &quot;git:/my_repo&quot;)
+      git.expects(:git).with(&quot;clone&quot;, [&quot;git:/my_repo&quot;, '.'], :execute_in_current_directory =&gt; false)
+      git.expects(:git).with(&quot;reset&quot;, ['--hard', '5460c9ea8872745629918986df7238871f4135ae'])
+      git.checkout(Git::Revision.new('5460c9ea8872745629918986df7238871f4135ae', &quot;me&quot;, Time.at(0)))
+    end
+  end
+
+  def test_update
+    in_sandbox do
+      git = new_git
+      git.expects(:git).with(&quot;reset&quot;, [&quot;--hard&quot;, &quot;origin/master&quot;])
+      git.update
+    end
+  end
+
+  def test_up_to_date?_should_return_false_if_there_are_new_revisions
+    in_sandbox do
+      git = new_git
+      git.expects(:git).with(&quot;remote&quot;, [&quot;update&quot;])
+      git.expects(:git).with(&quot;log&quot;, [&quot;--pretty=raw&quot;, &quot;HEAD..origin/master&quot;]).returns(&quot;a log output&quot;)
+
+      mock_parser = Object.new
+      mock_parser.expects(:parse).with(&quot;a log output&quot;).returns([:new_revision])
+      Git::LogParser.expects(:new).returns(mock_parser)
+
+      reasons = []
+      assert_false git.up_to_date?(reasons)
+      assert_equal [[:new_revision]], reasons
+    end
+  end
+
+  def test_up_to_date?_should_return_true_if_there_are_no_new_revisions
+    in_sandbox do
+      git = new_git
+      git.expects(:git).with(&quot;remote&quot;, [&quot;update&quot;])
+      git.expects(:git).with(&quot;log&quot;, [&quot;--pretty=raw&quot;, &quot;HEAD..origin/master&quot;]).returns(&quot;\n&quot;)
+
+      mock_parser = Object.new
+      mock_parser.expects(:parse).with(&quot;\n&quot;).returns([])
+      Git::LogParser.expects(:new).returns(mock_parser)
+
+      assert_true git.up_to_date?
+    end
+  end
+
+  
   def test_initialize_should_remember_repository
     git = Git.new(:repository =&gt; &quot;git:/my_repo&quot;)
     assert_equal &quot;git:/my_repo&quot;, git.repository
@@ -31,7 +79,8 @@ class SourceControl::GitTest &lt; Test::Unit::TestCase
   def test_latest_revision_should_call_git_log_and_send_it_to_parser
     in_sandbox do
       git = new_git
-      git.expects(:git).with(&quot;log&quot;, [&quot;-1&quot;, '--pretty=raw']).returns('')
+      git.expects(:git).with(&quot;log&quot;, [&quot;-1&quot;, '--pretty=raw', 'origin/master']).returns('')
+      git.expects(:git).with('remote', ['update'])
       stub_parser = Object.new
       stub_parser.stubs(:parse).returns([:foo])
       Git::LogParser.expects(:new).returns(stub_parser)</diff>
      <filename>test/unit/source_control/git_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>59e0af75b3fcecb478428a9e8fae5058f91c885a</id>
    </parent>
  </parents>
  <author>
    <name>Alexey Verkhovsky</name>
    <email>alexey.verkhovsky@gmail.com</email>
  </author>
  <url>http://github.com/willbryant/cruisecontrolrb/commit/9a49b7d5f66b49a8d65e3a2c6860643e3f656aee</url>
  <id>9a49b7d5f66b49a8d65e3a2c6860643e3f656aee</id>
  <committed-date>2008-05-05T14:31:08-07:00</committed-date>
  <authored-date>2008-05-05T14:31:08-07:00</authored-date>
  <message>wrote tests for git.rb</message>
  <tree>305281c789305835a4de0d7271c2180613d589fa</tree>
  <committer>
    <name>Alexey Verkhovsky</name>
    <email>alexey.verkhovsky@gmail.com</email>
  </committer>
</commit>
