<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -43,6 +43,7 @@ module Integrity
         end
     
         def clone
+          log &quot;Cloning #{uri} to #{working_directory}&quot;
           `git clone #{uri} #{working_directory}`
         end
 
@@ -52,11 +53,13 @@ module Integrity
             when local_branches.include?(branch) then branch
             else                                      &quot;-b #{branch} origin/#{branch}&quot;
           end
-          
+
+          log &quot;Checking-out #{strategy}&quot;
           `cd #{working_directory} &amp;&amp; git checkout #{strategy}`
         end
 
         def pull
+          log &quot;Pull-ing in #{working_directory}&quot;
           `cd #{working_directory} &amp;&amp; git pull`
         end
 
@@ -71,6 +74,10 @@ module Integrity
         def on_branch?
           File.basename(`cd #{working_directory} &amp;&amp; git symbolic-ref HEAD`).chomp == branch
         end
+
+        def log(message)
+          Integrity.logger.info(&quot;Git&quot;) { message }
+        end
     end
   end
 end</diff>
      <filename>lib/integrity/scm/git.rb</filename>
    </modified>
    <modified>
      <diff>@@ -22,6 +22,12 @@ describe Integrity::SCM::Git do
     @git.name.should == &quot;Git&quot;
   end
 
+  specify &quot;#log should delegate to Integrity#log with 'Git' as progname&quot; do
+    message = lambda { &quot;message&quot; }
+    Integrity.logger.should_receive(:info).with(&quot;Git&quot;) { message }
+    @git.send(:log, &quot;message&quot;)
+  end
+
   describe &quot;Determining the state of the code for this project&quot; do
     it &quot;should know if a project has been cloned or not by looking at the directories&quot; do
       File.stub!(:directory?).with(&quot;/var/integrity/exports/foca-integrity/.git&quot;).and_return(true)
@@ -39,6 +45,29 @@ describe Integrity::SCM::Git do
     end
   end
 
+  describe &quot;Logging of operations&quot; do
+    before do
+      @git.stub!(:`)
+      Integrity.stub!(:logger).and_return(mock(&quot;logger&quot;, :info =&gt; &quot;&quot;))
+    end
+
+    it &quot;should log clone&quot; do
+      @git.should_receive(:log).
+        with(&quot;Cloning git://github.com/foca/integrity.git to /var/integrity/exports/foca-integrity&quot;)
+      @git.clone
+    end
+
+    it &quot;should log checkout&quot; do
+      @git.should_receive(:log).with(&quot;Checking-out HEAD&quot;)
+      @git.checkout('HEAD')
+    end
+
+    it &quot;should log pull&quot; do
+      @git.should_receive(:log).with(&quot;Pull-ing in /var/integrity/exports/foca-integrity&quot;)
+      @git.pull
+    end
+  end
+
   describe &quot;Fetching the code from the repo&quot; do
     before do
       @git.stub!(:on_branch?).and_return(true)</diff>
      <filename>spec/scm/git_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>dfd589f421c3850e47034e4dbc43ce3db37e2ad4</id>
    </parent>
  </parents>
  <author>
    <name>Simon Rozet</name>
    <email>simon@rozet.name</email>
  </author>
  <url>http://github.com/foca/integrity/commit/bc3e0a60f2538c117188f6b76ce39a3c4933482a</url>
  <id>bc3e0a60f2538c117188f6b76ce39a3c4933482a</id>
  <committed-date>2008-11-21T16:26:30-08:00</committed-date>
  <authored-date>2008-11-21T16:05:45-08:00</authored-date>
  <message>log scm operations</message>
  <tree>f35d0560144973053bc672d9670dbafb18aeedfa</tree>
  <committer>
    <name>Simon Rozet</name>
    <email>simon@rozet.name</email>
  </committer>
</commit>
