<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,15 +1,15 @@
 module Grit
-  
+
   class Actor
     attr_reader :name
     attr_reader :email
-    
+
     def initialize(name, email)
       @name = name
       @email = email
     end
     alias_method :to_s, :name
-    
+
     # Create an Actor from a string.
     #   +str+ is the string, which is expected to be in regular git format
     #
@@ -26,11 +26,11 @@ module Grit
           return self.new(str, nil)
       end
     end
-    
+
     # Pretty object inspection
     def inspect
       %Q{#&lt;Grit::Actor &quot;#{@name} &lt;#{@email}&gt;&quot;&gt;}
     end
   end # Actor
-  
+
 end # Grit</diff>
      <filename>lib/grit/actor.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,12 +1,12 @@
 module Grit
-  
+
   class Blob
     DEFAULT_MIME_TYPE = &quot;text/plain&quot;
-    
+
     attr_reader :id
     attr_reader :mode
     attr_reader :name
-    
+
     # Create an unbaked Blob containing just the specified attributes
     #   +repo+ is the Repo
     #   +atts+ is a Hash of instance variable data
@@ -15,7 +15,7 @@ module Grit
     def self.create(repo, atts)
       self.allocate.create_initialize(repo, atts)
     end
-    
+
     # Initializer for Blob.create
     #   +repo+ is the Repo
     #   +atts+ is a Hash of instance variable data
@@ -28,21 +28,21 @@ module Grit
       end
       self
     end
-    
+
     # The size of this blob in bytes
     #
     # Returns Integer
     def size
       @size ||= @repo.git.cat_file({:s =&gt; true}, id).chomp.to_i
     end
-    
+
     # The binary contents of this blob.
     #
     # Returns String
     def data
       @data ||= @repo.git.cat_file({:p =&gt; true}, id)
     end
-    
+
     # The mime type of this file (based on the filename)
     #
     # Returns String
@@ -50,17 +50,17 @@ module Grit
       guesses = MIME::Types.type_for(self.name) rescue []
       guesses.first ? guesses.first.simplified : DEFAULT_MIME_TYPE
     end
-    
+
     # The blame information for the given file at the given commit
     #
     # Returns Array: [Grit::Commit, Array: [&lt;line&gt;]]
     def self.blame(repo, commit, file)
       data = repo.git.blame({:p =&gt; true}, commit, '--', file)
-      
+
       commits = {}
       blames = []
       info = nil
-      
+
       data.split(&quot;\n&quot;).each do |line|
         parts = line.split(/\s+/, 2)
         case parts.first
@@ -107,11 +107,11 @@ module Grit
 
       blames
     end
-    
+
     def basename
       File.basename(name)
     end
-    
+
     # Pretty object inspection
     def inspect
       %Q{#&lt;Grit::Blob &quot;#{@id}&quot;&gt;}</diff>
      <filename>lib/grit/blob.rb</filename>
    </modified>
    <modified>
      <diff>@@ -178,11 +178,11 @@ module Grit
         self.class.diff(@repo, parents.first.id, @id)
       end
     end
-    
+
     def stats
       stats = @repo.commit_stats(self.sha, 1)[0][-1]
     end
-    
+
     # Convert this Commit to a String which is just the SHA1 id
     def to_s
       @id</diff>
      <filename>lib/grit/commit.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,9 @@
 module Grit
-  
+
   class CommitStats
-    
+
     attr_reader :id, :files, :additions, :deletions, :total
-    
+
     # Instantiate a new CommitStats
     #   +id+ is the id of the commit
     #   +files+ is an array of :
@@ -16,11 +16,11 @@ module Grit
       @repo = repo
       @id = id
       @files = files
-      @additions  = files.inject(0) { |total, a| total += a[1] } 
-      @deletions  = files.inject(0) { |total, a| total += a[2] } 
-      @total  = files.inject(0) { |total, a| total += a[3] } 
+      @additions  = files.inject(0) { |total, a| total += a[1] }
+      @deletions  = files.inject(0) { |total, a| total += a[2] }
+      @total  = files.inject(0) { |total, a| total += a[3] }
     end
-    
+
     # Find all commit stats matching the given criteria.
     #   +repo+ is the Repo
     #   +ref+ is the ref from which to begin (SHA1 or name) or nil for --all
@@ -31,19 +31,19 @@ module Grit
     # Returns assoc array [sha, Grit::Commit[] (baked)]
     def self.find_all(repo, ref, options = {})
       allowed_options = [:max_count, :skip, :since]
-            
+
       default_options = {:numstat =&gt; true}
       actual_options = default_options.merge(options)
-      
+
       if ref
         output = repo.git.log(actual_options, ref)
       else
         output = repo.git.log(actual_options.merge(:all =&gt; true))
       end
-      
+
       self.list_from_string(repo, output)
     end
-    
+
     # Parse out commit information into an array of baked Commit objects
     #   +repo+ is the Repo
     #   +text+ is the text output from the git command (raw format)
@@ -51,19 +51,19 @@ module Grit
     # Returns assoc array [sha, Grit::Commit[] (baked)]
     def self.list_from_string(repo, text)
       lines = text.split(&quot;\n&quot;)
-      
+
       commits = []
 
       while !lines.empty?
         id = lines.shift.split.last
-        
+
         lines.shift
         lines.shift
         lines.shift
-        
+
         message_lines = []
         message_lines &lt;&lt; lines.shift[4..-1] while lines.first =~ /^ {4}/ || lines.first == ''
-        
+
         lines.shift while lines.first &amp;&amp; lines.first.empty?
 
         files = []
@@ -74,29 +74,29 @@ module Grit
           total = additions + deletions
           files &lt;&lt; [filename, additions, deletions, total]
         end
-        
+
         lines.shift while lines.first &amp;&amp; lines.first.empty?
-        
+
         commits &lt;&lt; [id, CommitStats.new(repo, id, files)]
       end
-      
+
       commits
     end
-    
+
     # Pretty object inspection
     def inspect
       %Q{#&lt;Grit::CommitStats &quot;#{@id}&quot;&gt;}
     end
-    
+
     # Convert to an easy-to-traverse structure
     def to_diffstat
       files.map do |metadata|
         DiffStat.new(*metadata)
       end
     end
-    
+
     # private
-    
+
     def to_hash
       {
         'id'        =&gt; id,
@@ -106,16 +106,16 @@ module Grit
         'total'     =&gt; total
       }
     end
-    
+
   end # CommitStats
-  
+
   class DiffStat
     attr_reader :filename, :additions, :deletions
 
     def initialize(filename, additions, deletions, total=nil)
       @filename, @additions, @deletions = filename, additions, deletions
     end
-    
+
     def net
       additions - deletions
     end
@@ -124,5 +124,5 @@ module Grit
       &quot;#{filename}: +#{additions} -#{deletions}&quot;
     end
   end
-  
+
 end # Grit</diff>
      <filename>lib/grit/commit_stats.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,32 +1,32 @@
 module Grit
-  
+
   class Config
     def initialize(repo)
       @repo = repo
     end
-    
+
     def []=(key, value)
       @repo.git.config({}, key, value)
       @data = nil
     end
-    
+
     def [](key)
       data[key]
     end
-    
+
     def fetch(key, default = nil)
       data[key] || default || raise(IndexError.new(&quot;key not found&quot;))
     end
-    
+
     def keys
       data.keys
     end
-    
+
     protected
       def data
         @data ||= load_config
       end
-      
+
       def load_config
         hash = {}
         config_lines.map do |line|
@@ -35,10 +35,10 @@ module Grit
         end
         hash
       end
-      
+
       def config_lines
         @repo.git.config(:list =&gt; true).split(/\n/)
       end
   end # Config
-  
+
 end # Grit
\ No newline at end of file</diff>
      <filename>lib/grit/config.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,12 +1,12 @@
 module Grit
-  
+
   class Diff
     attr_reader :a_path, :b_path
     attr_reader :a_blob, :b_blob
     attr_reader :a_mode, :b_mode
     attr_reader :new_file, :deleted_file
     attr_reader :diff
-    
+
     def initialize(repo, a_path, b_path, a_blob, b_blob, a_mode, b_mode, new_file, deleted_file, diff)
       @repo = repo
       @a_path = a_path
@@ -19,28 +19,28 @@ module Grit
       @deleted_file = deleted_file || @b_blob.nil?
       @diff = diff
     end
-    
+
     def self.list_from_string(repo, text)
       lines = text.split(&quot;\n&quot;)
-      
+
       diffs = []
-      
+
       while !lines.empty?
         m, a_path, b_path = *lines.shift.match(%r{^diff --git a/(.+?) b/(.+)$})
-        
+
         if lines.first =~ /^old mode/
           m, a_mode = *lines.shift.match(/^old mode (\d+)/)
           m, b_mode = *lines.shift.match(/^new mode (\d+)/)
         end
-        
+
         if lines.empty? || lines.first =~ /^diff --git/
           diffs &lt;&lt; Diff.new(repo, a_path, b_path, nil, nil, a_mode, b_mode, false, false, nil)
           next
         end
-        
+
         new_file = false
         deleted_file = false
-        
+
         if lines.first =~ /^new file/
           m, b_mode = lines.shift.match(/^new file mode (.+)$/)
           a_mode = nil
@@ -50,21 +50,21 @@ module Grit
           b_mode = nil
           deleted_file = true
         end
-        
+
         m, a_blob, b_blob, b_mode = *lines.shift.match(%r{^index ([0-9A-Fa-f]+)\.\.([0-9A-Fa-f]+) ?(.+)?$})
         b_mode.strip! if b_mode
-        
+
         diff_lines = []
         while lines.first &amp;&amp; lines.first !~ /^diff/
           diff_lines &lt;&lt; lines.shift
         end
         diff = diff_lines.join(&quot;\n&quot;)
-        
+
         diffs &lt;&lt; Diff.new(repo, a_path, b_path, a_blob, b_blob, a_mode, b_mode, new_file, deleted_file, diff)
       end
-      
+
       diffs
     end
   end # Diff
-  
+
 end # Grit</diff>
      <filename>lib/grit/diff.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 module Grit
   class InvalidGitRepositoryError &lt; StandardError
   end
-  
+
   class NoSuchPathError &lt; StandardError
   end
 end
\ No newline at end of file</diff>
      <filename>lib/grit/errors.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,22 +2,22 @@ require 'grit/git-ruby/repository'
 require 'grit/git-ruby/file_index'
 
 module Grit
-  
+
   # the functions in this module intercept the calls to git binary
   # made buy the grit objects and attempts to run them in pure ruby
   # if it will be faster, or if the git binary is not available (!!TODO!!)
   module GitRuby
-    
+
     attr_accessor :ruby_git_repo, :git_file_index
-    
+
     def init(options)
       if options.size == 0
         Grit::GitRuby::Repository.init(@git_dir)
       else
-        method_missing('init', options) 
+        method_missing('init', options)
       end
     end
-    
+
     def cat_file(options, ref)
       if options[:t]
         file_type(ref)
@@ -29,7 +29,7 @@ module Grit
     rescue Grit::GitRuby::Repository::NoSuchShaFound
       ''
     end
-    
+
     # lib/grit/tree.rb:16:      output = repo.git.ls_tree({}, treeish, *paths)
     def ls_tree(options, treeish, *paths)
       sha = rev_parse({}, treeish)
@@ -42,7 +42,7 @@ module Grit
     def diff(options, sha1, sha2)
       try_run { ruby_git.diff(sha1, sha2, options) }
     end
-    
+
     def rev_list(options, ref = 'master')
       options.delete(:skip) if options[:skip].to_i == 0
       allowed_options = [:max_count, :since, :until, :pretty]  # this is all I can do right now
@@ -53,18 +53,18 @@ module Grit
         begin
           return file_index.commits_from(rev_parse({}, ref)).join(&quot;\n&quot;) + &quot;\n&quot;
         rescue
-          return method_missing('rev-list', options, ref) 
+          return method_missing('rev-list', options, ref)
         end
       else
         aref = rev_parse({}, ref)
         if aref.is_a? Array
-          return method_missing('rev-list', options, ref) 
+          return method_missing('rev-list', options, ref)
         else
           return try_run { ruby_git.rev_list(aref, options) }
         end
       end
     end
-    
+
     def rev_parse(options, string)
       raise RuntimeError, &quot;invalid string: #{string}&quot; unless string.is_a?(String)
 
@@ -82,11 +82,11 @@ module Grit
 
       head = File.join(@git_dir, 'refs', 'remotes', string)
       return File.read(head).chomp if File.file?(head)
-      
+
       head = File.join(@git_dir, 'refs', 'tags', string)
       return File.read(head).chomp if File.file?(head)
-      
-      ## check packed-refs file, too 
+
+      ## check packed-refs file, too
       packref = File.join(@git_dir, 'packed-refs')
       if File.file?(packref)
         File.readlines(packref).each do |line|
@@ -96,13 +96,13 @@ module Grit
           end
         end
       end
-      
+
       ## !! more - partials and such !!
-      
+
       # revert to calling git - grr
       return method_missing('rev-parse', {}, string).chomp
     end
-    
+
     def refs(options, prefix)
       refs = []
       already = {}
@@ -134,7 +134,7 @@ module Grit
 
       refs.join(&quot;\n&quot;)
     end
-    
+
     def tags(options, prefix)
       refs = []
       already = {}
@@ -164,7 +164,7 @@ module Grit
               # Annotated tags in packed-refs include a reference
               # to the commit object on the following line.
               next_line = lines[i + 1]
-              
+
               id =
               if next_line &amp;&amp; next_line[0] == ?^
                 next_line[1..-1].chomp
@@ -183,15 +183,15 @@ module Grit
 
       refs.join(&quot;\n&quot;)
     end
-    
+
     def file_size(ref)
       try_run { ruby_git.cat_file_size(ref).to_s }
     end
-    
+
     def file_type(ref)
       try_run { ruby_git.cat_file_type(ref).to_s }
     end
-    
+
     def blame_tree(commit, path = nil)
       begin
         path = [path].join('/').to_s + '/' if (path &amp;&amp; path != '')
@@ -202,17 +202,17 @@ module Grit
         {}
       end
     end
-    
+
     def file_index
       @git_file_index ||= FileIndex.new(@git_dir)
     end
-    
+
     def ruby_git
       @ruby_git_repo ||= Repository.new(@git_dir)
     end
-    
+
     private
-    
+
       def try_run
         ret = ''
         Timeout.timeout(self.class.git_timeout) do
@@ -223,7 +223,7 @@ module Grit
         #if @bytes_read &gt; 5242880 # 5.megabytes
         #  bytes = @bytes_read
         #  @bytes_read = 0
-        #  raise Grit::Git::GitTimeout.new(command, bytes) 
+        #  raise Grit::Git::GitTimeout.new(command, bytes)
         #end
 
         ret
@@ -232,7 +232,7 @@ module Grit
         @bytes_read = 0
         raise Grit::Git::GitTimeout.new(command, bytes)
       end
-    
+
       def looking_for(commit, path = nil)
         tree_sha = ruby_git.get_subtree(rev_parse({}, commit), path)
 
@@ -248,7 +248,7 @@ module Grit
         end
         looking_for
       end
-    
+
       def clean_paths(commit_array)
         new_commits = {}
         commit_array.each do |file, sha|
@@ -258,10 +258,10 @@ module Grit
         new_commits
       end
 
-    # TODO     
+    # TODO
     # git grep -n 'foo' 'master'
     # git log --pretty='raw' --max-count='1' 'master' -- 'LICENSE'
     # git log --pretty='raw' --max-count='1' 'master' -- 'test'
-    
+
   end
 end</diff>
      <filename>lib/grit/git-ruby.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,14 +1,14 @@
 begin
   require 'sequel'
-  
+
   module Grit
-  
+
     class CommitDb
-    
+
       SCHEMA_VERSION = 1
 
       attr_accessor :db, :git
-        
+
       def initialize(git_obj, index_location = nil)
         @git = git_obj
         db_file = File.join(index_location || @git.git_dir, 'commit_db')
@@ -19,10 +19,10 @@ begin
           @db = Sequel.open &quot;sqlite:///#{db_file}&quot;
         end
       end
-      
+
       def rev_list(branch, options)
       end
-      
+
       def update_db(branch = nil)
         # find all refs/heads, for each
         # add branch if not there
@@ -35,18 +35,18 @@ begin
       def setup_tables
         @db &lt;&lt; &quot;create table meta (meta_key text, meta_value text)&quot;
         @db[:meta] &lt;&lt; {:meta_key =&gt; 'schema', :meta_value =&gt; SCHEMA_VERSION}
-        
+
         @db &lt;&lt; &quot;create table commits (id integer, sha text, author_date integer)&quot;
         @db &lt;&lt; &quot;create table nodes (id integer, path text, type text)&quot;
         @db &lt;&lt; &quot;create table branches (id integer, ref text, commit_id integer)&quot;
-        
+
         @db &lt;&lt; &quot;create table commit_branches (commit_id integer, branch_id integer)&quot;
-        @db &lt;&lt; &quot;create table commit_nodes (commit_id integer, node_id integer, node_sha string)&quot;        
+        @db &lt;&lt; &quot;create table commit_nodes (commit_id integer, node_id integer, node_sha string)&quot;
       end
-    
+
     end
   end
-        
+
 rescue LoadError
   # no commit db
 end</diff>
      <filename>lib/grit/git-ruby/commit_db.rb</filename>
    </modified>
    <modified>
      <diff>@@ -15,21 +15,21 @@ module Grit
   module GitRuby
 
   class FileIndex
-    
+
     class IndexFileNotFound &lt; StandardError
     end
 
     class UnsupportedRef &lt; StandardError
     end
-    
+
     class &lt;&lt; self
       attr_accessor :max_file_size
     end
-  
+
     self.max_file_size = 10_000_000 # ~10M
-    
+
     attr_reader :files
-    
+
     # initializes index given repo_path
     def initialize(repo_path)
       @index_file = File.join(repo_path, 'file-index')
@@ -39,30 +39,30 @@ module Grit
         raise IndexFileNotFound
       end
     end
-    
+
     # returns count of all commits
     def count_all
       @sha_count
     end
-    
+
     # returns count of all commits reachable from SHA
-    # note: originally did this recursively, but ruby gets pissed about that on 
+    # note: originally did this recursively, but ruby gets pissed about that on
     # really big repos where the stack level gets 'too deep' (thats what she said)
     def count(commit_sha)
       commits_from(commit_sha).size
     end
-    
+
     # builds a list of all commits reachable from a single commit
     def commits_from(commit_sha)
       raise UnsupportedRef if commit_sha.is_a? Array
-      
+
       already = {}
       final = []
       left_to_do = [commit_sha]
-      
+
       while commit_sha = left_to_do.shift
         next if already[commit_sha]
-        
+
         final &lt;&lt; commit_sha
         already[commit_sha] = true
 
@@ -74,34 +74,34 @@ module Grit
 
       sort_commits(final)
     end
-    
+
     def sort_commits(sha_array)
       sha_array.sort { |a, b| @commit_order[b].to_i &lt;=&gt; @commit_order[a].to_i }
     end
-    
+
     # returns files changed at commit sha
     def files(commit_sha)
       @commit_index[commit_sha][:files] rescue nil
     end
-    
+
     # returns all commits for a file
     def commits_for(file)
       @all_files[file]
     end
-    
-    # returns the shas of the last commits for all 
+
+    # returns the shas of the last commits for all
     # the files in [] from commit_sha
     # files_matcher can be a regexp or an array
     def last_commits(commit_sha, files_matcher)
       acceptable = commits_from(commit_sha)
-      
+
       matches = {}
-      
+
       if files_matcher.is_a? Regexp
         files = @all_files.keys.select { |file| file =~ files_matcher }
         files_matcher = files
       end
-            
+
       if files_matcher.is_a? Array
         # find the last commit for each file in the array
         files_matcher.each do |f|
@@ -113,10 +113,10 @@ module Grit
           end if @all_files[f]
         end
       end
-      
+
       matches
     end
-    
+
     private
 
       # read and parse the file-index data
@@ -151,7 +151,7 @@ module Grit
       end
 
   end
-  
+
   end
 end
 
@@ -159,7 +159,7 @@ end
 # benchmark testing on big-ass repos
 
 if __FILE__ == $0
-  
+
   #repo = '/Users/schacon/projects/git/.git'
   #commit = 'd8933f013a66cc1deadf83a9c24eccb6fee78a35'
   #file_list = [&quot;builtin-merge-recursive.c&quot;, &quot;git-send-email-script&quot;, &quot;git-parse-remote.sh&quot;, &quot;builtin-add.c&quot;, &quot;merge-base.c&quot;, &quot;read-cache.c&quot;, &quot;fsck.h&quot;, &quot;diff.c&quot;, &quot;refs.c&quot;, &quot;diffcore-rename.c&quot;, &quot;epoch.c&quot;, &quot;pack-intersect.c&quot;, &quot;fast-import.c&quot;, &quot;git-applypatch.sh&quot;, &quot;git.spec.in&quot;, &quot;rpush.c&quot;, &quot;git-clone-script&quot;, &quot;utf8.c&quot;, &quot;git-external-diff-script&quot;, &quot;builtin-init-db.c&quot;, &quot;pack-redundant.c&quot;, &quot;builtin-diff-index.c&quot;, &quot;index.c&quot;, &quot;update-index.c&quot;, &quot;fetch-clone.c&quot;, &quot;pager.c&quot;, &quot;diff.h&quot;, &quot;unpack-trees.c&quot;, &quot;git-browse-help.sh&quot;, &quot;git-rename-script&quot;, &quot;refs.h&quot;, &quot;get-tar-commit-id.c&quot;, &quot;git-push.sh&quot;, &quot;README&quot;, &quot;delta.c&quot;, &quot;mailsplit.c&quot;, &quot;gitweb.cgi&quot;, &quot;var.c&quot;, &quot;epoch.h&quot;, &quot;gsimm.c&quot;, &quot;archive.c&quot;, &quot;sideband.c&quot;, &quot;utf8.h&quot;, &quot;local-fetch.c&quot;, &quot;git-request-pull-script&quot;, &quot;builtin-send-pack.c&quot;, &quot;blob.c&quot;, &quot;builtin-ls-remote.c&quot;, &quot;pretty.c&quot;, &quot;git-diff.sh&quot;, &quot;diffcore-break.c&quot;, &quot;unpack-trees.h&quot;, &quot;git-mv.perl&quot;, &quot;interpolate.c&quot;, &quot;builtin-diff-files.c&quot;, &quot;delta.h&quot;, &quot;commit-tree.c&quot;, &quot;git-diff-script&quot;, &quot;decorate.c&quot;, &quot;builtin-name-rev.c&quot;, &quot;tree-walk.c&quot;, &quot;git-revert-script&quot;, &quot;git-sh-setup.sh&quot;, &quot;transport.c&quot;, &quot;gsimm.h&quot;, &quot;archive.h&quot;, &quot;count-delta.c&quot;, &quot;sideband.h&quot;, &quot;git-merge.sh&quot;, &quot;git-gui.sh&quot;, &quot;git-core.spec.in&quot;, &quot;cvs2git.c&quot;, &quot;blob.h&quot;, &quot;git.sh&quot;, &quot;http-push.c&quot;, &quot;builtin-commit-tree.c&quot;, &quot;diff-helper.c&quot;, &quot;builtin-push.c&quot;, &quot;interpolate.h&quot;, &quot;decorate.h&quot;, &quot;git-citool&quot;, &quot;dotest&quot;, &quot;builtin-verify-tag.c&quot;, &quot;git-mergetool.sh&quot;, &quot;tree-walk.h&quot;, &quot;log-tree.c&quot;, &quot;name-rev.c&quot;, &quot;applypatch&quot;, &quot;cat-file.c&quot;, &quot;test-delta.c&quot;, &quot;server-info.c&quot;, &quot;count-delta.h&quot;, &quot;write-tree.c&quot;, &quot;local-pull.c&quot;, &quot;transport.h&quot;, &quot;git-rm.sh&quot;, &quot;unpack-objects.c&quot;, &quot;xdiff-interface.c&quot;, &quot;git-repack-script&quot;, &quot;commit.c&quot;, &quot;hash-object.c&quot;, &quot;git-merge-recursive.py&quot;, &quot;git-clone-dumb-http&quot;, &quot;thread-utils.c&quot;, &quot;git-send-email.perl&quot;, &quot;git-whatchanged.sh&quot;, &quot;log-tree.h&quot;, &quot;builtin-annotate.c&quot;, &quot;show-index.c&quot;, &quot;pkt-line.c&quot;, &quot;ident.c&quot;, &quot;git-rebase-script&quot;, &quot;name-hash.c&quot;, &quot;git-archimport.perl&quot;, &quot;xdiff-interface.h&quot;, &quot;commit.h&quot;, &quot;diff-lib.c&quot;, &quot;wt-status.c&quot;, &quot;base85.c&quot;, &quot;builtin-fetch--tool.c&quot;, &quot;unpack-file.c&quot;, &quot;builtin-diff-stages.c&quot;, &quot;merge-index.c&quot;, &quot;color.c&quot;, &quot;diff-tree.c&quot;, &quot;git-checkout.sh&quot;, &quot;thread-utils.h&quot;, &quot;grep.c&quot;, &quot;pkt-line.h&quot;, &quot;builtin-help.c&quot;, &quot;test-parse-options.c&quot;, &quot;show-files.c&quot;, &quot;git.sh.in&quot;, &quot;pack.h&quot;, &quot;wt-status.h&quot;, &quot;git-prune-script&quot;, &quot;test-sha1.c&quot;, &quot;git-octopus.sh&quot;, &quot;dump-cache-tree.c&quot;, &quot;git-web--browse.sh&quot;, &quot;builtin-upload-tar.c&quot;, &quot;builtin-clone.c&quot;, &quot;copy.c&quot;, &quot;color.h&quot;, &quot;show-branch.c&quot;, &quot;peek-remote.c&quot;, &quot;git-merge-recursive-old.py&quot;, &quot;cmd-rename.sh&quot;, &quot;git-apply-patch-script&quot;, &quot;git-export.c&quot;, &quot;git-relink-script&quot;, &quot;grep.h&quot;, &quot;usage.c&quot;, &quot;git-fetch-dumb-http&quot;, &quot;fsck-objects.c&quot;, &quot;update-cache.c&quot;, &quot;diff-stages.c&quot;, &quot;patch-ids.c&quot;, &quot;builtin-rev-list.c&quot;, &quot;builtin-bundle.c&quot;, &quot;builtin-show-branch.c&quot;, &quot;builtin-pack-refs.c&quot;, &quot;tree.c&quot;, &quot;git.c&quot;, &quot;verify_pack.c&quot;, &quot;update-ref.c&quot;, &quot;builtin-peek-remote.c&quot;, &quot;diffcore-pathspec.c&quot;, &quot;git-merge-octopus.sh&quot;, &quot;git-show-branches-script&quot;, &quot;builtin-archive.c&quot;, &quot;builtin-unpack-objects.c&quot;, &quot;git-rerere.perl&quot;, &quot;walker.c&quot;, &quot;builtin-mailsplit.c&quot;, &quot;convert.c&quot;, &quot;builtin-branch.c&quot;, &quot;export.c&quot;, &quot;patch-ids.h&quot;, &quot;check-builtins.sh&quot;, &quot;git-pull-script&quot;, &quot;tree.h&quot;, &quot;alloc.c&quot;, &quot;git-commit.sh&quot;, &quot;git-lost-found.sh&quot;, &quot;mailmap.c&quot;, &quot;rsh.c&quot;, &quot;exec_cmd.c&quot;, &quot;git-compat-util.h&quot;, &quot;ws.c&quot;, &quot;rev-list.c&quot;, &quot;git-verify-tag.sh&quot;, &quot;git-ls-remote-script&quot;, &quot;mktree.c&quot;, &quot;walker.h&quot;, &quot;builtin-blame.c&quot;, &quot;builtin-fsck.c&quot;, &quot;setup.c&quot;, &quot;git-cvsimport-script&quot;, &quot;git-add.sh&quot;, &quot;symlinks.c&quot;, &quot;checkout-index.c&quot;, &quot;receive-pack.c&quot;, &quot;git-merge-one-file-script&quot;, &quot;mailmap.h&quot;, &quot;git-cvsimport.perl&quot;, &quot;builtin-count.c&quot;, &quot;exec_cmd.h&quot;, &quot;builtin-stripspace.c&quot;, &quot;git-grep.sh&quot;, &quot;hash.c&quot;, &quot;builtin-prune-packed.c&quot;, &quot;git-rebase--interactive.sh&quot;, &quot;rsh.h&quot;, &quot;match-trees.c&quot;, &quot;git-format-patch.sh&quot;, &quot;git-push-script&quot;, &quot;parse-options.c&quot;, &quot;git-status-script&quot;, &quot;http-walker.c&quot;, &quot;pack-write.c&quot;, &quot;git-status.sh&quot;, &quot;diff-delta.c&quot;, &quot;hash.h&quot;, &quot;generate-cmdlist.sh&quot;, &quot;config-set.c&quot;, &quot;builtin-fetch.c&quot;, &quot;ll-merge.c&quot;, &quot;t1300-config-set.sh&quot;, &quot;ls-tree.c&quot;, &quot;write_or_die.c&quot;, &quot;builtin-check-ref-format.c&quot;, &quot;fetch-pack.c&quot;, &quot;git-commit-script&quot;, &quot;builtin-describe.c&quot;, &quot;parse-options.h&quot;, &quot;builtin-checkout.c&quot;, &quot;prune-packed.c&quot;, &quot;fixup-builtins&quot;, &quot;http-fetch.c&quot;, &quot;test-absolute-path.c&quot;, &quot;git-log.sh&quot;, &quot;builtin-merge-ours.c&quot;, &quot;git-whatchanged&quot;, &quot;pull.c&quot;, &quot;merge-tree.c&quot;, &quot;ll-merge.h&quot;, &quot;builtin.h&quot;, &quot;Makefile&quot;, &quot;cache-tree.c&quot;, &quot;builtin-log.c&quot;, &quot;merge-cache.c&quot;, &quot;fetch-pack.h&quot;, &quot;git-shortlog.perl&quot;, &quot;git-bisect-script&quot;, &quot;git-am.sh&quot;, &quot;check-ref-format.c&quot;, &quot;git-count-objects-script&quot;, &quot;mkdelta.c&quot;, &quot;builtin-diff.c&quot;, &quot;merge-recursive.c&quot;, &quot;builtin-config.c&quot;, &quot;gitenv.c&quot;, &quot;describe.c&quot;, &quot;git-add--interactive.perl&quot;, &quot;pull.h&quot;, &quot;builtin-apply.c&quot;, &quot;diff-index.c&quot;, &quot;ssh-pull.c&quot;, &quot;builtin-merge-file.c&quot;, &quot;strbuf.c&quot;, &quot;git-submodule.sh&quot;, &quot;repo-config.c&quot;, &quot;run-command.c&quot;, &quot;git-applymbox.sh&quot;, &quot;cache-tree.h&quot;, &quot;builtin-clean.c&quot;, &quot;cache.h&quot;, &quot;git-prune.sh&quot;, &quot;fsck-cache.c&quot;, &quot;builtin-remote.c&quot;, &quot;sha1_file.c&quot;, &quot;shallow.c&quot;, &quot;merge-recursive.h&quot;, &quot;builtin-checkout-index.c&quot;, &quot;git-clone.sh&quot;, &quot;builtin-mv.c&quot;, &quot;builtin-reflog.c&quot;, &quot;lockfile.c&quot;, &quot;git-octopus-script&quot;, &quot;.mailmap&quot;, &quot;strbuf.h&quot;, &quot;git-p4import.py&quot;, &quot;builtin-repo-config.c&quot;, &quot;patch-delta.c&quot;, &quot;builtin-merge-base.c&quot;, &quot;run-command.h&quot;, &quot;check-racy.c&quot;, &quot;git-filter-branch.sh&quot;, &quot;git-branch.sh&quot;, &quot;git-merge-stupid.sh&quot;, &quot;diff-files.c&quot;, &quot;test-sha1.sh&quot;, &quot;COPYING&quot;, &quot;git-lost+found.sh&quot;, &quot;git-tag.sh&quot;, &quot;git-branch-script&quot;, &quot;check-files.c&quot;, &quot;builtin-reset.c&quot;, &quot;builtin-ls-files.c&quot;, &quot;builtin-fmt-merge-msg.c&quot;, &quot;builtin-for-each-ref.c&quot;, &quot;csum-file.c&quot;, &quot;git-gc.sh&quot;, &quot;git-parse-remote-script&quot;, &quot;command-list.txt&quot;, &quot;builtin-pack-objects.c&quot;, &quot;dir.c&quot;, &quot;test-date.c&quot;, &quot;builtin-grep.c&quot;, &quot;list-objects.c&quot;, &quot;clone-pack.c&quot;, &quot;git-gui&quot;, &quot;convert-cache.c&quot;, &quot;git-reset-script&quot;, &quot;checkout-cache.c&quot;, &quot;git-ls-remote.sh&quot;, &quot;read-tree.c&quot;, &quot;git-instaweb.sh&quot;, &quot;progress.c&quot;, &quot;rabinpoly.c&quot;, &quot;ls-files.c&quot;, &quot;mktag.c&quot;, &quot;gitMergeCommon.py&quot;, &quot;git-merge-ours.sh&quot;, &quot;rpull.c&quot;, &quot;git-annotate.perl&quot;, &quot;csum-file.h&quot;, &quot;builtin-shortlog.c&quot;, &quot;builtin-commit.c&quot;, &quot;http-pull.c&quot;, &quot;git-fetch.sh&quot;, &quot;apply.c&quot;, &quot;git-add-script&quot;, &quot;dir.h&quot;, &quot;diff-tree-helper.c&quot;, &quot;list-objects.h&quot;, &quot;rev-tree.c&quot;, &quot;builtin-tar-tree.c&quot;, &quot;progress.h&quot;, &quot;builtin-pickaxe.c&quot;, &quot;git-merge-fredrik.py&quot;, &quot;path.c&quot;, &quot;builtin-diff-tree.c&quot;, &quot;rabinpoly.h&quot;, &quot;builtin-ls-tree.c&quot;, &quot;tar.h&quot;, &quot;trace.c&quot;, &quot;graph.c&quot;, &quot;ssh-fetch.c&quot;, &quot;show-diff.c&quot;, &quot;sha1-lookup.c&quot;, &quot;builtin-revert.c&quot;, &quot;builtin-symbolic-ref.c&quot;, &quot;builtin-write-tree.c&quot;, &quot;git-sh-setup-script&quot;, &quot;rev-cache.c&quot;, &quot;blame.c&quot;, &quot;builtin-mailinfo.c&quot;, &quot;git-cherry&quot;, &quot;git-resolve-script&quot;, &quot;INSTALL&quot;, &quot;git-findtags.perl&quot;, &quot;diffcore-delta.c&quot;, &quot;entry.c&quot;, &quot;git-applypatch&quot;, &quot;connect.c&quot;, &quot;tar-tree.c&quot;, &quot;graph.h&quot;, &quot;missing-revs.c&quot;, &quot;builtin-fast-export.c&quot;, &quot;sha1-lookup.h&quot;, &quot;rev-parse.c&quot;, &quot;configure.ac&quot;, &quot;rev-cache.h&quot;, &quot;build-rev-cache.c&quot;, &quot;reachable.c&quot;, &quot;index-pack.c&quot;, &quot;git&quot;, &quot;send-pack.c&quot;, &quot;git-cherry.sh&quot;, &quot;git-tag-script&quot;, &quot;revision.c&quot;, &quot;CREDITS-GEN&quot;, &quot;bundle.c&quot;, &quot;mailinfo.c&quot;, &quot;symbolic-ref.c&quot;, &quot;attr.c&quot;, &quot;git-archimport-script&quot;, &quot;archive-zip.c&quot;, &quot;diff-cache.c&quot;, &quot;fetch.c&quot;, &quot;builtin-gc.c&quot;, &quot;git-remote.perl&quot;, &quot;path-list.c&quot;, &quot;ssh-upload.c&quot;, &quot;reachable.h&quot;, &quot;diff-no-index.c&quot;, &quot;diffcore.h&quot;, &quot;send-pack.h&quot;, &quot;tree-diff.c&quot;, &quot;git-checkout-script&quot;, &quot;pack-revindex.c&quot;, &quot;show-rev-cache.c&quot;, &quot;TODO&quot;, &quot;revision.h&quot;, &quot;bundle.h&quot;, &quot;unresolve.c&quot;, &quot;git-deltafy-script&quot;, &quot;git-relink.perl&quot;, &quot;archive-tar.c&quot;, &quot;attr.h&quot;, &quot;git-resolve.sh&quot;, &quot;config.mak.in&quot;, &quot;builtin-update-index.c&quot;, &quot;convert-objects.c&quot;, &quot;fetch.h&quot;, &quot;builtin-runstatus.c&quot;, &quot;quote.c&quot;, &quot;init-db.c&quot;, &quot;git-shortlog&quot;, &quot;builtin-prune.c&quot;, &quot;builtin-rerere.c&quot;, &quot;verify-pack.c&quot;, &quot;gitk&quot;, &quot;patch-id.c&quot;, &quot;.gitattributes&quot;, &quot;date.c&quot;, &quot;git-format-patch-script&quot;, &quot;path-list.h&quot;, &quot;pack-revindex.h&quot;, &quot;GIT-VERSION-GEN&quot;, &quot;combine-diff.c&quot;, &quot;environment.c&quot;, &quot;git-cvsserver.perl&quot;, &quot;git-repack.sh&quot;, &quot;diffcore-order.c&quot;, &quot;reflog-walk.c&quot;, &quot;config.c&quot;, &quot;test-match-trees.c&quot;, &quot;git-svnimport.perl&quot;, &quot;quote.h&quot;, &quot;write-blob.c&quot;, &quot;diffcore-pickaxe.c&quot;, &quot;builtin-update-ref.c&quot;, &quot;stripspace.c&quot;, &quot;help.c&quot;, &quot;pack-objects.c&quot;, &quot;branch.c&quot;, &quot;git-verify-tag-script&quot;, &quot;TEST&quot;, &quot;daemon.c&quot;, &quot;remote.c&quot;, &quot;git-log-script&quot;, &quot;git-pull.sh&quot;, &quot;git-quiltimport.sh&quot;, &quot;git-count-objects.sh&quot;, &quot;reflog-walk.h&quot;, &quot;git-applymbox&quot;, &quot;builtin-show-ref.c&quot;, &quot;RelNotes&quot;, &quot;git-fmt-merge-msg.perl&quot;, &quot;git-rebase.sh&quot;, &quot;git-parse-remote&quot;, &quot;git-browse--help.sh&quot;, &quot;git-stash.sh&quot;, &quot;alias.c&quot;, &quot;branch.h&quot;, &quot;gitweb.pl&quot;, &quot;builtin-upload-archive.c&quot;, &quot;builtin-cat-file.c&quot;, &quot;sha1_name.c&quot;, &quot;http.c&quot;, &quot;test-chmtime.c&quot;, &quot;remote.h&quot;, &quot;ssh-push.c&quot;, &quot;tag.c&quot;, &quot;update-server-info.c&quot;, &quot;git-cvsexportcommit.perl&quot;, &quot;builtin-check-attr.c&quot;, &quot;git-revert.sh&quot;, &quot;builtin-verify-pack.c&quot;, &quot;object.c&quot;, &quot;git-merge-resolve.sh&quot;, &quot;shortlog.h&quot;, &quot;git-fetch-script&quot;, &quot;test-genrandom.c&quot;, &quot;shell.c&quot;, &quot;builtin-rm.c&quot;, &quot;builtin-zip-tree.c&quot;, &quot;upload-pack.c&quot;, &quot;git-rename.perl&quot;, &quot;.gitignore&quot;, &quot;tag.h&quot;, &quot;http.h&quot;, &quot;git-request-pull.sh&quot;, &quot;object.h&quot;, &quot;git-svn.perl&quot;, &quot;builtin-fetch-pack.c&quot;, &quot;git-bisect.sh&quot;, &quot;pack-check.c&quot;, &quot;builtin-rev-parse.c&quot;, &quot;object-refs.c&quot;, &quot;test-gsimm.c&quot;, &quot;builtin-read-tree.c&quot;, &quot;git-help--browse.sh&quot;, &quot;merge-file.c&quot;, &quot;fsck.c&quot;, &quot;builtin-tag.c&quot;, &quot;builtin-http-fetch.c&quot;, &quot;builtin-count-objects.c&quot;, &quot;git-reset.sh&quot;, &quot;git-clean.sh&quot;, &quot;git-merge-one-file.sh&quot;, &quot;ctype.c&quot;, &quot;git-mktag.c&quot;, &quot;imap-send.c&quot;]
@@ -168,7 +168,7 @@ if __FILE__ == $0
   commit = 'c87612bc84c95ba9df17674d911dde10f34fefaa'
 
   require 'benchmark'
-  
+
   Benchmark.bm(20) do |x|
     x.report('index build') do
       i = Grit::GitRuby::FileIndex.new(repo)
@@ -188,6 +188,6 @@ if __FILE__ == $0
     end
   end
 end
-  
-  
-  
+
+
+</diff>
      <filename>lib/grit/git-ruby/file_index.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 #
 # converted from the gitrb project
 #
-# authors: 
+# authors:
 #    Matthias Lederhofer &lt;matled@gmx.net&gt;
 #    Simon 'corecode' Schubert &lt;corecode@fs.ei.tum.de&gt;
 #    Scott Chacon &lt;schacon@gmail.com&gt;
@@ -24,7 +24,7 @@ module Grit
       @email = ''
       @date = Time.now
       @offset = 0
-      
+
       m = /^(.*?) &lt;(.*)&gt; (\d+) ([+-])0*(\d+?)$/.match(str)
       if !m
         case str
@@ -50,7 +50,7 @@ module Grit
   class GitObject
     attr_accessor :repository
 
-    def GitObject.from_raw(rawobject, repository = nil)      
+    def GitObject.from_raw(rawobject, repository = nil)
       case rawobject.type
       when :blob
         return Blob.from_raw(rawobject, repository)
@@ -110,7 +110,7 @@ module Grit
     S_IFLNK =  0120000
     S_IFREG =  0100000
     S_IFDIR =  0040000
-    S_IFGITLINK = 0160000 
+    S_IFGITLINK = 0160000
     attr_accessor :mode, :name, :sha1
     def initialize(mode, filename, sha1o)
       @mode = 0
@@ -170,7 +170,7 @@ module Grit
     def format_mode
       &quot;%06o&quot; % @mode
     end
-    
+
     def raw
       &quot;%o %s\0%s&quot; % [@mode, @name, [@sha1].pack(&quot;H*&quot;)]
     end
@@ -191,20 +191,20 @@ module Grit
     string
   end
 
-  
+
   class Tree &lt; GitObject
     attr_accessor :entry
 
     def self.from_raw(rawobject, repository=nil)
       raw = StringIO.new(rawobject.content)
-  
+
       entries = []
       while !raw.eof?
         mode      = Grit::GitRuby.read_bytes_until(raw, ' ')
         file_name = Grit::GitRuby.read_bytes_until(raw, &quot;\0&quot;)
         raw_sha   = raw.read(20)
         sha = raw_sha.unpack(&quot;H*&quot;).first
-        
+
         entries &lt;&lt; DirectoryEntry.new(mode, file_name, sha)
       end
       new(entries, repository)
@@ -224,7 +224,7 @@ module Grit
       #@entry.sort { |a,b| a.name &lt;=&gt; b.name }.
       @entry.collect { |e| [[e.format_mode, e.format_type, e.sha1].join(' '), e.name].join(&quot;\t&quot;) }.join(&quot;\n&quot;)
     end
-    
+
     def actual_raw
       #@entry.collect { |e| e.raw.join(' '), e.name].join(&quot;\t&quot;) }.join(&quot;\n&quot;)
     end
@@ -280,28 +280,28 @@ module Grit
         @parent.collect { |i| &quot;parent %s\n&quot; % i }.join,
         @author, @committer] + @message
     end
-    
+
     def raw_log(sha)
       output = &quot;commit #{sha}\n&quot;
       output += @headers + &quot;\n\n&quot;
       output += @message.split(&quot;\n&quot;).map { |l| '    ' + l }.join(&quot;\n&quot;) + &quot;\n\n&quot;
     end
-    
+
   end
 
   class Tag &lt; GitObject
     attr_accessor :object, :type, :tag, :tagger, :message
 
     def self.from_raw(rawobject, repository=nil)
-      
+
       headers, message = rawobject.content.split(/\n\n/, 2)
       headers = headers.split(/\n/).map { |header| header.split(' ', 2) }
-      
+
       object = ''
       type = ''
       tag = ''
       tagger = ''
-      
+
       headers.each do |key, value|
         case key
         when &quot;object&quot;</diff>
      <filename>lib/grit/git-ruby/git_object.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 #
 # converted from the gitrb project
 #
-# authors: 
+# authors:
 #    Matthias Lederhofer &lt;matled@gmx.net&gt;
 #    Simon 'corecode' Schubert &lt;corecode@fs.ei.tum.de&gt;
 #    Scott Chacon &lt;schacon@gmail.com&gt;
@@ -9,8 +9,8 @@
 # provides native ruby access to git objects and pack files
 #
 
-module Grit 
-  module GitRuby 
+module Grit
+  module GitRuby
     module Internal
       class FileWindow
         def initialize(file, version = 1)
@@ -53,6 +53,6 @@ module Grit
         end
       end
     end
-  end 
+  end
 end
 </diff>
      <filename>lib/grit/git-ruby/internal/file_window.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 #
 # converted from the gitrb project
 #
-# authors: 
+# authors:
 #    Matthias Lederhofer &lt;matled@gmx.net&gt;
 #    Simon 'corecode' Schubert &lt;corecode@fs.ei.tum.de&gt;
 #    Scott Chacon &lt;schacon@gmail.com&gt;
@@ -14,7 +14,7 @@ require 'digest/sha1'
 require 'grit/git-ruby/internal/raw_object'
 
 module Grit
-  module GitRuby 
+  module GitRuby
     module Internal
       class LooseObjectError &lt; StandardError
       end
@@ -65,16 +65,16 @@ module Grit
         def put_raw_object(content, type)
           size = content.length.to_s
           LooseStorage.verify_header(type, size)
-          
+
           header = &quot;#{type} #{size}\0&quot;
           store = header + content
-                    
+
           sha1 = Digest::SHA1.hexdigest(store)
           path = @directory+'/'+sha1[0...2]+'/'+sha1[2..40]
-          
+
           if !File.exists?(path)
             content = Zlib::Deflate.deflate(store)
-          
+
             FileUtils.mkdir_p(@directory+'/'+sha1[0...2])
             File.open(path, 'wb') do |f|
               f.write content
@@ -82,17 +82,17 @@ module Grit
           end
           return sha1
         end
-        
+
         # simply figure out the sha
         def self.calculate_sha(content, type)
           size = content.length.to_s
           verify_header(type, size)
           header = &quot;#{type} #{size}\0&quot;
           store = header + content
-                    
+
           Digest::SHA1.hexdigest(store)
         end
-        
+
         def self.verify_header(type, size)
           if !%w(blob tree commit tag).include?(type) || size !~ /^\d+$/
             raise LooseObjectError, &quot;invalid object header&quot;
@@ -132,6 +132,6 @@ module Grit
         end
         private :legacy_loose_object?
       end
-    end 
+    end
   end
 end</diff>
      <filename>lib/grit/git-ruby/internal/loose.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 #
 # converted from the gitrb project
 #
-# authors: 
+# authors:
 #    Matthias Lederhofer &lt;matled@gmx.net&gt;
 #    Simon 'corecode' Schubert &lt;corecode@fs.ei.tum.de&gt;
 #    Scott Chacon &lt;schacon@gmail.com&gt;
@@ -13,11 +13,11 @@ require 'zlib'
 require 'grit/git-ruby/internal/raw_object'
 require 'grit/git-ruby/internal/file_window'
 
-PACK_SIGNATURE = &quot;PACK&quot; 
-PACK_IDX_SIGNATURE = &quot;\377tOc&quot; 
+PACK_SIGNATURE = &quot;PACK&quot;
+PACK_IDX_SIGNATURE = &quot;\377tOc&quot;
 
-module Grit 
-  module GitRuby 
+module Grit
+  module GitRuby
     module Internal
       class PackFormatError &lt; StandardError
       end
@@ -44,7 +44,7 @@ module Grit
           @cache = {}
           init_pack
         end
-        
+
         def with_idx(index_file = nil)
           if !index_file
             index_file = @name
@@ -52,35 +52,35 @@ module Grit
           else
             idxfile = File.open(index_file, 'rb')
           end
-          
+
           # read header
           sig = idxfile.read(4)
           ver = idxfile.read(4).unpack(&quot;N&quot;)[0]
-          
+
           if sig == PACK_IDX_SIGNATURE
             if(ver != 2)
               raise PackFormatError, &quot;pack #@name has unknown pack file version #{ver}&quot;
-            end            
+            end
             @version = 2
           else
             @version = 1
           end
-                    
+
           idx = FileWindow.new(idxfile, @version)
           yield idx
           idx.unmap
           idxfile.close
         end
-        
+
         def with_packfile
           packfile = File.open(@name, 'rb')
           yield packfile
           packfile.close
         end
-        
+
         def cache_objects
           @cache = {}
-          with_packfile do |packfile|          
+          with_packfile do |packfile|
             each_entry do |sha, offset|
               data, type = unpack_object(packfile, offset, {:caching =&gt; true})
               if data
@@ -93,7 +93,7 @@ module Grit
         def name
           @name
         end
-        
+
         def close
           # shouldnt be anything open now
         end
@@ -104,12 +104,12 @@ module Grit
           each_sha1 { |sha| shas &lt;&lt; sha.unpack(&quot;H*&quot;)[0] }
           shas
         end
-        
+
         def [](sha1)
           if obj = @cache[sha1]
-            return obj 
+            return obj
           end
-          
+
           offset = find_object(sha1)
           return nil if !offset
           @cache[sha1] = obj = parse_object(offset)
@@ -129,7 +129,7 @@ module Grit
             @size = @offsets[-1]
           end
         end
-        
+
         def each_entry
           with_idx do |idx|
             if @version == 2
@@ -148,7 +148,7 @@ module Grit
             end
           end
         end
-        
+
         def read_data_v2(idx)
           data = []
           pos = OffsetStart
@@ -169,7 +169,7 @@ module Grit
           data
         end
         private :read_data_v2
-        
+
         def each_sha1
           with_idx do |idx|
             if @version == 2
@@ -191,7 +191,7 @@ module Grit
         def find_object_in_index(idx, sha1)
           slot = sha1.getord(0)
           return nil if !slot
-          first, last = @offsets[slot,2] 
+          first, last = @offsets[slot,2]
           while first &lt; last
             mid = (first + last) / 2
             if @version == 2
@@ -224,16 +224,16 @@ module Grit
           end
           nil
         end
-        
+
         def find_object(sha1)
           obj = nil
           with_idx do |idx|
             obj = find_object_in_index(idx, sha1)
           end
           obj
-        end    
+        end
         private :find_object
-        
+
         def parse_object(offset)
           obj = nil
           with_packfile do |packfile|
@@ -259,9 +259,9 @@ module Grit
             shift += 7
             offset += 1
           end
-        
+
           return [false, false] if !(type == OBJ_COMMIT || type == OBJ_TREE) &amp;&amp; options[:caching]
-          
+
           case type
           when OBJ_OFS_DELTA, OBJ_REF_DELTA
             data, type = unpack_deltified(packfile, type, offset, obj_offset, size, options)
@@ -297,9 +297,9 @@ module Grit
           end
 
           base, type = unpack_object(packfile, base_offset)
-          
+
           return [false, false] if !(type == OBJ_COMMIT || type == OBJ_TREE) &amp;&amp; options[:caching]
-          
+
           delta = unpack_compressed(offset, size)
           [patch_delta(base, delta), type]
         end
@@ -378,5 +378,5 @@ module Grit
         private :patch_delta_header_size
       end
     end
-  end 
+  end
 end</diff>
      <filename>lib/grit/git-ruby/internal/pack.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 #
 # converted from the gitrb project
 #
-# authors: 
+# authors:
 #    Matthias Lederhofer &lt;matled@gmx.net&gt;
 #    Simon 'corecode' Schubert &lt;corecode@fs.ei.tum.de&gt;
 #
@@ -10,8 +10,8 @@
 
 require 'digest/sha1'
 
-module Grit 
-  module GitRuby 
+module Grit
+  module GitRuby
     module Internal
       OBJ_NONE = 0
       OBJ_COMMIT = 1
@@ -32,6 +32,6 @@ module Grit
           Digest::SHA1.digest(&quot;%s %d\0&quot; % [@type, @content.length] + @content)
         end
       end
-    end 
+    end
   end
 end</diff>
      <filename>lib/grit/git-ruby/internal/raw_object.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 #
 # converted from the gitrb project
 #
-# authors: 
+# authors:
 #    Matthias Lederhofer &lt;matled@gmx.net&gt;
 #    Simon 'corecode' Schubert &lt;corecode@fs.ei.tum.de&gt;
 #    Scott Chacon &lt;schacon@gmail.com&gt;
@@ -40,7 +40,7 @@ module Grit
   class Object
     attr_accessor :repository
 
-    def Object.from_raw(rawobject, repository = nil)      
+    def Object.from_raw(rawobject, repository = nil)
       case rawobject.type
       when :blob
         return Blob.from_raw(rawobject, repository)
@@ -154,7 +154,7 @@ module Grit
     def format_mode
       &quot;%06o&quot; % @mode
     end
-    
+
     def raw
       &quot;%o %s\0%s&quot; % [@mode, @name, [@sha1].pack(&quot;H*&quot;)]
     end
@@ -175,20 +175,20 @@ module Grit
     string
   end
 
-  
+
   class Tree &lt; Object
     attr_accessor :entry
 
     def self.from_raw(rawobject, repository=nil)
       raw = StringIO.new(rawobject.content)
-  
+
       entries = []
       while !raw.eof?
         mode      = Grit::GitRuby.read_bytes_until(raw, ' ')
         file_name = Grit::GitRuby.read_bytes_until(raw, &quot;\0&quot;)
         raw_sha   = raw.read(20)
         sha = raw_sha.unpack(&quot;H*&quot;).first
-        
+
         entries &lt;&lt; DirectoryEntry.new(mode, file_name, sha)
       end
       new(entries, repository)
@@ -208,7 +208,7 @@ module Grit
       #@entry.sort { |a,b| a.name &lt;=&gt; b.name }.
       @entry.collect { |e| [[e.format_mode, e.format_type, e.sha1].join(' '), e.name].join(&quot;\t&quot;) }.join(&quot;\n&quot;)
     end
-    
+
     def actual_raw
       #@entry.collect { |e| e.raw.join(' '), e.name].join(&quot;\t&quot;) }.join(&quot;\n&quot;)
     end
@@ -264,13 +264,13 @@ module Grit
         @parent.collect { |i| &quot;parent %s\n&quot; % i }.join,
         @author, @committer] + @message
     end
-    
+
     def raw_log(sha)
       output = &quot;commit #{sha}\n&quot;
       output += @headers + &quot;\n\n&quot;
       output += @message.split(&quot;\n&quot;).map { |l| '    ' + l }.join(&quot;\n&quot;) + &quot;\n\n&quot;
     end
-    
+
   end
 
   class Tag &lt; Object</diff>
      <filename>lib/grit/git-ruby/object.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 #
 # converted from the gitrb project
 #
-# authors: 
+# authors:
 #    Matthias Lederhofer &lt;matled@gmx.net&gt;
 #    Simon 'corecode' Schubert &lt;corecode@fs.ei.tum.de&gt;
 #    Scott Chacon &lt;schacon@gmail.com&gt;
@@ -31,20 +31,20 @@ module Grit
 
       class NoSuchPath &lt; StandardError
       end
-      
+
       attr_accessor :git_dir, :options
-      
+
       def initialize(git_dir, options = {})
         @git_dir = git_dir
         @options = options
         @packs = []
       end
-      
+
       # returns the loose objects object lazily
       def loose
         @loose ||= initloose
       end
-      
+
       # returns the array of pack list objects
       def packs
         @packs ||= initpacks
@@ -67,7 +67,7 @@ module Grit
         end
       end
 
-     
+
       # returns a raw object given a SHA1
       def get_raw_object_by_sha1(sha1o)
         raise NoSuchShaFound if sha1o.nil? || sha1o.empty? || !sha1o.is_a?(String)
@@ -99,19 +99,19 @@ module Grit
       def cached(key, object, do_cache = true)
         object
       end
-      
+
       # returns GitRuby object of any type given a SHA1
       def get_object_by_sha1(sha1)
         r = get_raw_object_by_sha1(sha1)
         return nil if !r
         GitObject.from_raw(r)
       end
-      
+
       # writes a raw object into the git repo
       def put_raw_object(content, type)
         loose.first.put_raw_object(content, type)
       end
-      
+
       # returns true or false if that sha exists in the db
       def object_exists?(sha1)
         sha_hex = [sha1].pack(&quot;H*&quot;)
@@ -121,7 +121,7 @@ module Grit
         return true if in_packs?(sha_hex) #maybe the object got packed in the meantime
         false
       end
-      
+
       # returns true if the hex-packed sha is in the packfiles
       def in_packs?(sha_hex)
         # try packs
@@ -130,7 +130,7 @@ module Grit
         end
         false
       end
-      
+
       # returns true if the hex-packed sha is in the loose objects
       def in_loose?(sha_hex)
         loose.each do |lsobj|
@@ -138,34 +138,34 @@ module Grit
         end
         false
       end
-      
-      
+
+
       # returns the file type (as a symbol) of this sha
       def cat_file_type(sha)
         get_raw_object_by_sha1(sha).type
       end
-       
-      # returns the file size (as an int) of this sha           
+
+      # returns the file size (as an int) of this sha
       def cat_file_size(sha)
         get_raw_object_by_sha1(sha).content.size
       end
-      
+
       # returns the raw file contents of this sha
       def cat_file(sha)
         get_object_by_sha1(sha).raw_content
       end
-      
+
       # returns a 2-d hash of the tree
       # ['blob']['FILENAME'] = {:mode =&gt; '100644', :sha =&gt; SHA}
       # ['tree']['DIRNAME'] = {:mode =&gt; '040000', :sha =&gt; SHA}
-      def list_tree(sha)        
+      def list_tree(sha)
         data = {'blob' =&gt; {}, 'tree' =&gt; {}, 'link' =&gt; {}, 'commit' =&gt; {}}
         get_object_by_sha1(sha).entry.each do |e|
           data[e.format_type][e.name] = {:mode =&gt; e.format_mode, :sha =&gt; e.sha1}
-        end 
+        end
         data
       end
-      
+
       # returns the raw (cat-file) output for a tree
       # if given a commit sha, it will print the tree of that commit
       # if given a path limiter array, it will limit the output to those
@@ -244,11 +244,11 @@ module Grit
             tree
           end
         end
-      end  
-      
+      end
+
       # returns an array of GitRuby Commit objects
       # [ [sha, raw_output], [sha, raw_output], [sha, raw_output] ... ]
-      # 
+      #
       # takes the following options:
       #  :since - Time object specifying that you don't want commits BEFORE this
       #  :until - Time object specifying that you don't want commit AFTER this
@@ -270,40 +270,40 @@ module Grit
         end
         return new_arr
       end
-      
+
       def rev_list(sha, options)
         if sha.is_a? Array
           (end_sha, sha) = sha
         end
-        
+
         log = log(sha, options)
         log = log.sort { |a, b| a[2] &lt;=&gt; b[2] }.reverse
-                
+
         if end_sha
           log = truncate_arr(log, end_sha)
         end
-        
+
         # shorten the list if it's longer than max_count (had to get everything in branches)
         if options[:max_count]
           if (opt_len = options[:max_count].to_i) &lt; log.size
             log = log[0, opt_len]
           end
         end
-        
+
         if options[:pretty] == 'raw'
           log.map {|k, v| v }.join('')
         else
           log.map {|k, v| k }.join(&quot;\n&quot;)
         end
       end
-      
+
       # called by log() to recursively walk the tree
       def walk_log(sha, opts, total_size = 0)
         return [] if @already_searched[sha] # to prevent rechecking branches
         @already_searched[sha] = true
-        
-        array = []          
-        if (sha)          
+
+        array = []
+        if (sha)
           o = get_raw_object_by_sha1(sha)
           if o.type == :tag
             commit_sha = get_object_by_sha1(sha).object
@@ -313,61 +313,61 @@ module Grit
           end
 
           return [] if c.type != :commit
-          
+
           add_sha = true
-          
+
           if opts[:since] &amp;&amp; opts[:since].is_a?(Time) &amp;&amp; (opts[:since] &gt; c.committer.date)
             add_sha = false
           end
           if opts[:until] &amp;&amp; opts[:until].is_a?(Time) &amp;&amp; (opts[:until] &lt; c.committer.date)
             add_sha = false
           end
-          
+
           # follow all parents unless '--first-parent' is specified #
           subarray = []
-          
+
           if !c.parent.first &amp;&amp; opts[:path_limiter]  # check for the last commit
             add_sha = false
           end
-          
+
           if (!opts[:max_count] || ((array.size + total_size) &lt; opts[:max_count]))
-            
+
             if !opts[:path_limiter]
               output = c.raw_log(sha)
               array &lt;&lt; [sha, output, c.committer.date]
             end
-            
+
             if (opts[:max_count] &amp;&amp; (array.size + total_size) &gt;= opts[:max_count])
               return array
             end
-            
+
             c.parent.each do |psha|
               if psha &amp;&amp; !files_changed?(c.tree, get_object_by_sha1(psha).tree,
                                         opts[:path_limiter])
-                add_sha = false 
+                add_sha = false
               end
-              subarray += walk_log(psha, opts, (array.size + total_size)) 
+              subarray += walk_log(psha, opts, (array.size + total_size))
               next if opts[:first_parent]
             end
-          
+
             if opts[:path_limiter] &amp;&amp; add_sha
               output = c.raw_log(sha)
               array &lt;&lt; [sha, output, c.committer.date]
-            end          
-            
+            end
+
             if add_sha
               array += subarray
             end
           end
-                                
+
         end
-        
+
         array
       end
 
       def diff(commit1, commit2, options = {})
         patch = ''
-        
+
         commit_obj1 = get_object_by_sha1(commit1)
         tree1 = commit_obj1.tree
         if commit2
@@ -429,21 +429,21 @@ module Grit
               output &lt;&lt; &quot;\n&quot;
             end
           end
-          
+
           output &lt;&lt; oldhunk.diff(format)
           output &lt;&lt; &quot;\n&quot;
-          
-          patch &lt;&lt; header + output.lstrip      
+
+          patch &lt;&lt; header + output.lstrip
         end
         patch
       rescue
-        '' # one of the trees was bad or lcs isn't there - no diff 
+        '' # one of the trees was bad or lcs isn't there - no diff
       end
-      
+
       # takes 2 tree shas and recursively walks them to find out what
-      # files or directories have been modified in them and returns an 
+      # files or directories have been modified in them and returns an
       # array of changes
-      # [ [full_path, 'added', tree1_hash, nil], 
+      # [ [full_path, 'added', tree1_hash, nil],
       #   [full_path, 'removed', nil, tree2_hash],
       #   [full_path, 'modified', tree1_hash, tree2_hash]
       #  ]
@@ -451,10 +451,10 @@ module Grit
          # handle empty trees
          changed = []
          return changed if tree1 == tree2
-         
+
          t1 = list_tree(tree1) if tree1
          t2 = list_tree(tree2) if tree2
-        
+
          # finding files that are different
          t1['blob'].each do |file, hsh|
            t2_file = t2['blob'][file] rescue nil
@@ -476,7 +476,7 @@ module Grit
            full = File.join(path, dir)
            if !t2_tree
              if recurse
-               changed += quick_diff(hsh[:sha], nil, full, true) 
+               changed += quick_diff(hsh[:sha], nil, full, true)
              else
                changed &lt;&lt; [full, 'added', hsh[:sha], nil]      # not in parent
              end
@@ -493,7 +493,7 @@ module Grit
            full = File.join(path, dir)
            if !t1_tree
              if recurse
-               changed += quick_diff(nil, hsh[:sha], full, true) 
+               changed += quick_diff(nil, hsh[:sha], full, true)
              else
                changed &lt;&lt; [full, 'removed', nil, hsh[:sha]]
              end
@@ -518,10 +518,10 @@ module Grit
         end
         true
       end
-        
+
       def get_subtree(commit_sha, path)
         tree_sha = get_object_by_sha1(commit_sha).tree
-        
+
         if path &amp;&amp; !(path == '' || path == '.' || path == './')
           paths = path.split('/')
           paths.each do |path|
@@ -533,10 +533,10 @@ module Grit
             end
           end
         end
-        
+
         tree_sha
       end
-      
+
       def blame_tree(commit_sha, path)
         # find subtree
         tree_sha = get_subtree(commit_sha, path)
@@ -546,10 +546,10 @@ module Grit
         get_object_by_sha1(tree_sha).entry.each do |e|
           looking_for &lt;&lt; File.join('.', e.name)
         end
-                        
+
         @already_searched = {}
         commits = look_for_commits(commit_sha, path, looking_for)
-        
+
         # cleaning up array
         arr = {}
         commits.each do |commit_array|
@@ -558,33 +558,33 @@ module Grit
         end
         arr
       end
-    
-      def look_for_commits(commit_sha, path, looking_for, options = {})        
+
+      def look_for_commits(commit_sha, path, looking_for, options = {})
         return [] if @already_searched[commit_sha] # to prevent rechecking branches
-                
+
         @already_searched[commit_sha] = true
-        
+
         commit = get_object_by_sha1(commit_sha)
         tree_sha = get_subtree(commit_sha, path)
 
         found_data = []
-        
+
         # at the beginning of the branch
-        if commit.parent.size == 0  
+        if commit.parent.size == 0
           looking_for.each do |search|
-            # prevents the rare case of multiple branch starting points with 
+            # prevents the rare case of multiple branch starting points with
             # files that have never changed
-            if found_data.assoc(search) 
+            if found_data.assoc(search)
               found_data &lt;&lt; [search, commit_sha]
             end
           end
           return found_data
         end
-        
+
         # go through the parents recursively, looking for somewhere this has been changed
         commit.parent.each do |pc|
           diff = quick_diff(tree_sha, get_subtree(pc, path), '.', false)
-          
+
           # remove anything found
           looking_for.each do |search|
             if match = diff.assoc(search)
@@ -592,7 +592,7 @@ module Grit
               looking_for.delete(search)
             end
           end
-          
+
           if looking_for.size &lt;= 0  # we're done
             return found_data
           end
@@ -600,11 +600,11 @@ module Grit
           found_data += look_for_commits(pc, path, looking_for)  # recurse into parent
           return found_data if options[:first_parent]
         end
-        
+
         ## TODO : find most recent commit with change in any parent
         found_data
       end
-      
+
       # initialize a git repository
       def self.init(dir, bare = true)
 
@@ -650,22 +650,22 @@ module Grit
         File.open(name, 'w') do |f|
           f.write contents
         end
-      end      
-      
+      end
+
       def close
         @packs.each do |pack|
           pack.close
         end if @packs
       end
-      
+
       protected
 
         def git_path(path)
           return &quot;#@git_dir/#{path}&quot;
         end
 
-      private 
-      
+      private
+
         def initloose
           @loaded = []
           @loose = []
@@ -673,7 +673,7 @@ module Grit
           load_alternate_loose(git_path('objects'))
           @loose
         end
-        
+
         def load_alternate_loose(path)
           # load alternate loose, too
           alt = File.join(path, 'info/alternates')
@@ -688,13 +688,13 @@ module Grit
             end
           end
         end
-      
+
         def load_loose(path)
           @loaded &lt;&lt; path
           return if !File.exists?(path)
           @loose &lt;&lt; Grit::GitRuby::Internal::LooseStorage.new(path)
         end
-        
+
         def initpacks
           close
           @loaded_packs = []
@@ -703,7 +703,7 @@ module Grit
           load_alternate_packs(git_path('objects'))
           @packs
         end
-      
+
         def load_alternate_packs(path)
           alt = File.join(path, 'info/alternates')
           if File.exists?(alt)
@@ -718,7 +718,7 @@ module Grit
             end
           end
         end
-        
+
         def load_packs(path)
           @loaded_packs &lt;&lt; path
           return if !File.exists?(path)
@@ -733,8 +733,8 @@ module Grit
             end
           end
         end
-      
+
     end
-    
+
   end
 end</diff>
      <filename>lib/grit/git-ruby/repository.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 require 'tempfile'
 module Grit
-  
+
   class Git
     class GitTimeout &lt; RuntimeError
       attr_reader :command, :bytes_read
@@ -12,7 +12,7 @@ module Grit
     end
 
     undef_method :clone
-    
+
     include GitRuby
 
     def exist?
@@ -30,7 +30,7 @@ module Grit
     class &lt;&lt; self
       attr_accessor :git_binary, :git_timeout, :git_max_size
     end
-  
+
     if RUBY_PLATFORM.downcase =~ /mswin(?!ce)|mingw|bccwin/
       self.git_binary   = &quot;git&quot; # using search path
     else
@@ -38,27 +38,27 @@ module Grit
     end
     self.git_timeout  = 10
     self.git_max_size = 5242880 # 5.megabytes
-    
+
     def self.with_timeout(timeout = 10.seconds)
       old_timeout = Grit::Git.git_timeout
       Grit::Git.git_timeout = timeout
       yield
       Grit::Git.git_timeout = old_timeout
     end
-    
+
     attr_accessor :git_dir, :bytes_read, :work_tree
-    
+
     def initialize(git_dir)
       self.git_dir    = git_dir
       self.work_tree  = git_dir.gsub(/\/\.git$/,'')
       self.bytes_read = 0
     end
-    
+
     def shell_escape(str)
       str.to_s.gsub(&quot;'&quot;, &quot;\\\\'&quot;).gsub(&quot;;&quot;, '\\;')
     end
     alias_method :e, :shell_escape
-    
+
     # Check if a normal file exists on the filesystem
     #   +file+ is the relative path from the Git dir
     #
@@ -66,7 +66,7 @@ module Grit
     def fs_exist?(file)
       File.exist?(File.join(self.git_dir, file))
     end
-    
+
     # Read a normal file from the filesystem.
     #   +file+ is the relative path from the Git dir
     #
@@ -74,7 +74,7 @@ module Grit
     def fs_read(file)
       File.open(File.join(self.git_dir, file)).read
     end
-    
+
     # Write a normal file to the filesystem.
     #   +file+ is the relative path from the Git dir
     #   +contents+ is the String content to be written
@@ -87,7 +87,7 @@ module Grit
         f.write(contents)
       end
     end
-    
+
     # Delete a normal file from the filesystem
     #   +file+ is the relative path from the Git dir
     #
@@ -95,7 +95,7 @@ module Grit
     def fs_delete(file)
       FileUtils.rm_rf(File.join(self.git_dir, file))
     end
-    
+
     # Move a normal file
     #   +from+ is the relative path to the current file
     #   +to+ is the relative path to the destination file
@@ -104,7 +104,7 @@ module Grit
     def fs_move(from, to)
       FileUtils.mv(File.join(self.git_dir, from), File.join(self.git_dir, to))
     end
-    
+
     # Make a directory
     #   +dir+ is the relative path to the directory to create
     #
@@ -112,7 +112,7 @@ module Grit
     def fs_mkdir(dir)
       FileUtils.mkdir_p(File.join(self.git_dir, dir))
     end
-    
+
     # Chmod the the file or dir and everything beneath
     #   +file+ is the relative path from the Git dir
     #
@@ -130,13 +130,13 @@ module Grit
     rescue
       []
     end
-        
+
     def create_tempfile(seed, unlink = false)
       path = Tempfile.new(seed).path
       File.unlink(path) if unlink
       return path
     end
-    
+
     def commit_from_sha(id)
       git_ruby_repo = GitRuby::Repository.new(self.git_dir)
       object = git_ruby_repo.get_object_by_sha1(id)
@@ -149,26 +149,26 @@ module Grit
         ''
       end
     end
-    
+
     def check_applies(head_sha, applies_sha)
       git_index = create_tempfile('index', true)
       (o1, exit1) = raw_git(&quot;git read-tree #{head_sha} 2&gt;/dev/null&quot;, git_index)
       (o2, exit2) = raw_git(&quot;git diff #{applies_sha}^ #{applies_sha} | git apply --check --cached &gt;/dev/null 2&gt;/dev/null&quot;, git_index)
       return (exit1 + exit2)
     end
-    
+
     def get_patch(applies_sha)
       git_index = create_tempfile('index', true)
       (patch, exit2) = raw_git(&quot;git diff #{applies_sha}^ #{applies_sha}&quot;, git_index)
       patch
     end
-    
+
     def apply_patch(head_sha, patch)
       git_index = create_tempfile('index', true)
-      
+
       git_patch = create_tempfile('patch')
       File.open(git_patch, 'w+') { |f| f.print patch }
-      
+
       raw_git(&quot;git read-tree #{head_sha} 2&gt;/dev/null&quot;, git_index)
       (op, exit) = raw_git(&quot;git apply --cached &lt; #{git_patch}&quot;, git_index)
       if exit == 0
@@ -176,7 +176,7 @@ module Grit
       end
       false
     end
-    
+
     # RAW CALLS WITH ENV SETTINGS
     def raw_git_call(command, index)
       tmp = ENV['GIT_INDEX_FILE']
@@ -198,9 +198,9 @@ module Grit
       output
     end
     # RAW CALLS WITH ENV SETTINGS END
-    
-    
-    
+
+
+
     # Run the given git command with the specified arguments and return
     # the result as a String
     #   +cmd+ is the command
@@ -227,7 +227,7 @@ module Grit
       timeout  = true if timeout.nil?
 
       opt_args = transform_options(options)
-      
+
       if RUBY_PLATFORM.downcase =~ /mswin(?!ce)|mingw|bccwin/
         ext_args = args.reject { |a| a.empty? }.map { |a| (a == '--' || a[0].chr == '|') ? a : &quot;\&quot;#{e(a)}\&quot;&quot; }
         call = &quot;#{prefix}#{Git.git_binary} --git-dir=\&quot;#{self.git_dir}\&quot; #{cmd.to_s.gsub(/_/, '-')} #{(opt_args + ext_args).join(' ')}#{e(postfix)}&quot;
@@ -235,7 +235,7 @@ module Grit
         ext_args = args.reject { |a| a.empty? }.map { |a| (a == '--' || a[0].chr == '|') ? a : &quot;'#{e(a)}'&quot; }
         call = &quot;#{prefix}#{Git.git_binary} --git-dir='#{self.git_dir}' #{cmd.to_s.gsub(/_/, '-')} #{(opt_args + ext_args).join(' ')}#{e(postfix)}&quot;
       end
-      
+
       Grit.log(call) if Grit.debug
       response, err = timeout ? sh(call) : wild_sh(call)
       Grit.log(response) if Grit.debug
@@ -313,5 +313,5 @@ module Grit
       args
     end
   end # Git
-  
+
 end # Grit</diff>
      <filename>lib/grit/git.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,14 +1,14 @@
 module Grit
-  
+
   class Index
     attr_accessor :repo, :tree, :current_tree
-    
+
     def initialize(repo)
       self.repo = repo
       self.tree = {}
       self.current_tree = nil
     end
-    
+
     # Add a file to the index
     #   +path+ is the path (including filename)
     #   +data+ is the binary contents of the file
@@ -17,18 +17,18 @@ module Grit
     def add(file_path, data)
       path = file_path.split('/')
       filename = path.pop
-      
+
       current = self.tree
-      
+
       path.each do |dir|
         current[dir] ||= {}
         node = current[dir]
         current = node
       end
-      
+
       current[filename] = data
     end
-        
+
     # Sets the current tree
     #   +tree+ the branch/tag/sha... to use - a string
     #
@@ -36,7 +36,7 @@ module Grit
     def read_tree(tree)
       self.current_tree = self.repo.tree(tree)
     end
-    
+
     # Commit the contents of the index
     #   +message+ is the commit message [nil]
     #   +parents+ is one or more commits to attach this commit to to form a new head [nil]
@@ -48,11 +48,11 @@ module Grit
     def commit(message, parents = nil, actor = nil, last_tree = nil, head = 'master')
       tree_sha1 = write_tree(self.tree, self.current_tree)
       return false if tree_sha1 == last_tree # don't write identical commits
-      
+
       contents = []
       contents &lt;&lt; ['tree', tree_sha1].join(' ')
       parents.each do |p|
-        contents &lt;&lt; ['parent', p].join(' ') if p        
+        contents &lt;&lt; ['parent', p].join(' ') if p
       end if parents
 
       if actor
@@ -63,25 +63,25 @@ module Grit
         name = config['user.name']
         email = config['user.email']
       end
-    
+
       author_string = &quot;#{name} &lt;#{email}&gt; #{Time.now.to_i} -0700&quot; # !! TODO : gotta fix this
       contents &lt;&lt; ['author', author_string].join(' ')
       contents &lt;&lt; ['committer', author_string].join(' ')
       contents &lt;&lt; ''
       contents &lt;&lt; message
-      
+
       commit_sha1 = self.repo.git.put_raw_object(contents.join(&quot;\n&quot;), 'commit')
-      
+
       self.repo.update_ref(head, commit_sha1)
     end
-    
+
     # Recursively write a tree to the index
     #   +tree+ is the tree
     #
     # Returns the SHA1 String of the tree
     def write_tree(tree, now_tree = nil)
       tree_contents = {}
-            
+
       # fill in original tree
       now_tree.contents.each do |obj|
         sha = [obj.id].pack(&quot;H*&quot;)
@@ -89,7 +89,7 @@ module Grit
         k += '/' if (obj.class == Grit::Tree)
         tree_contents[k] = &quot;%s %s\0%s&quot; % [obj.mode.to_s, obj.name, sha]
       end if now_tree
-      
+
       # overwrite with new tree contents
       tree.each do |k, v|
         case v
@@ -109,7 +109,7 @@ module Grit
       tr = tree_contents.sort.map { |k, v| v }.join('')
       self.repo.git.put_raw_object(tr, 'tree')
     end
-    
+
     # Write the blob to the index
     #   +data+ is the data to write
     #
@@ -118,5 +118,5 @@ module Grit
       self.repo.git.put_raw_object(data, 'blob')
     end
   end # Index
-  
+
 end # Grit</diff>
      <filename>lib/grit/index.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 ##
 # Allows attributes to be declared as lazy, meaning that they won't be
-# computed until they are asked for. 
+# computed until they are asked for.
 #
 # Works by delegating each lazy_reader to a cached lazy_source method.
 #</diff>
      <filename>lib/grit/lazy.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,20 +1,20 @@
 module Grit
-  
+
   class Merge
-    
+
     STATUS_BOTH = 'both'
     STATUS_OURS = 'ours'
     STATUS_THEIRS = 'theirs'
-    
+
     attr_reader :conflicts, :text, :sections
-    
+
     def initialize(str)
       status = STATUS_BOTH
-      
+
       section = 1
       @conflicts = 0
       @text = {}
-      
+
       lines = str.split(&quot;\n&quot;)
       lines.each do |line|
         if /^&lt;&lt;&lt;&lt;&lt;&lt;&lt; (.*?)/.match(line)
@@ -24,7 +24,7 @@ module Grit
         elsif line == '======='
           status = STATUS_THEIRS
         elsif /^&gt;&gt;&gt;&gt;&gt;&gt;&gt; (.*?)/.match(line)
-          status = STATUS_BOTH          
+          status = STATUS_BOTH
           section += 1
         else
           @text[section] ||= {}
@@ -35,11 +35,11 @@ module Grit
       @text = @text.values
       @sections = @text.size
     end
-    
+
     # Pretty object inspection
     def inspect
       %Q{#&lt;Grit::Merge}
     end
   end # Merge
-  
+
 end # Grit</diff>
      <filename>lib/grit/merge.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,16 +1,16 @@
 module Grit
-  
+
   class Repo
     DAEMON_EXPORT_FILE = 'git-daemon-export-ok'
-    
+
     # The path of the git repo as a String
     attr_accessor :path
     attr_accessor :working_dir
     attr_reader :bare
-    
+
     # The git command line interface object
     attr_accessor :git
-    
+
     # Create a new Repo instance
     #   +path+ is the path to either the root git directory or the bare git repo
     #   +options+ :is_bare force to load a bare repo
@@ -22,7 +22,7 @@ module Grit
     # Returns Grit::Repo
     def initialize(path, options = {})
       epath = File.expand_path(path)
-      
+
       if File.exist?(File.join(epath, '.git'))
         self.working_dir = epath
         self.path = File.join(epath, '.git')
@@ -35,10 +35,10 @@ module Grit
       else
         raise NoSuchPathError.new(epath)
       end
-      
+
       self.git = Git.new(self.path)
     end
-   
+
     # Does nothing yet...
     def self.init(path)
       # !! TODO !!
@@ -46,7 +46,7 @@ module Grit
       # generate initial git directory
       # create new Grit::Repo on that dir, return it
     end
-    
+
     # The project's description. Taken verbatim from GIT_REPO/description
     #
     # Returns String
@@ -58,7 +58,7 @@ module Grit
       Blame.new(self, file, commit)
     end
 
-    
+
     # An array of Head objects representing the branch heads in
     # this repo
     #
@@ -66,17 +66,17 @@ module Grit
     def heads
       Head.find_all(self)
     end
-    
+
     alias_method :branches, :heads
 
     def get_head(head_name)
       heads.find { |h| h.name == head_name }
     end
-    
+
     def is_head?(head_name)
       get_head(head_name)
     end
-    
+
     # Object reprsenting the current repo head.
     #
     # Returns Grit::Head (baked)
@@ -108,18 +108,18 @@ module Grit
     def remove(*files)
       self.git.rm({}, *files.flatten)
     end
-    
+
 
     def blame_tree(commit, path = nil)
       commit_array = self.git.blame_tree(commit, path)
-      
+
       final_array = {}
       commit_array.each do |file, sha|
         final_array[file] = commit(sha)
       end
       final_array
     end
-    
+
     def status
       Status.new(self)
     end
@@ -131,7 +131,7 @@ module Grit
     def tags
       Tag.find_all(self)
     end
-    
+
     # An array of Remote objects representing the remote branches in
     # this repo
     #
@@ -139,11 +139,11 @@ module Grit
     def remotes
       Remote.find_all(self)
     end
-    
+
     def remote_list
       self.git.list_remotes
     end
-    
+
     def remote_add(name, url)
       self.git.remote({}, 'add', name, url)
     end
@@ -155,7 +155,7 @@ module Grit
     # takes an array of remote names and last pushed dates
     # fetches from all of the remotes where the local fetch
     # date is earlier than the passed date, then records the
-    # last fetched date 
+    # last fetched date
     #
     # { 'origin' =&gt; date,
     #   'peter =&gt; date,
@@ -166,7 +166,7 @@ module Grit
         self.remote_fetch(remote)
       end
     end
-    
+
 
     # An array of Ref objects representing the refs in
     # this repo
@@ -179,10 +179,10 @@ module Grit
     def commit_stats(start = 'master', max_count = 10, skip = 0)
       options = {:max_count =&gt; max_count,
                  :skip =&gt; skip}
-      
+
       CommitStats.find_all(self, start, options)
     end
-    
+
     # An array of Commit objects representing the history of a given ref/commit
     #   +start+ is the branch/commit name (default 'master')
     #   +max_count+ is the maximum number of commits to return (default 10, use +false+ for all)
@@ -192,10 +192,10 @@ module Grit
     def commits(start = 'master', max_count = 10, skip = 0)
       options = {:max_count =&gt; max_count,
                  :skip =&gt; skip}
-      
+
       Commit.find_all(self, start, options)
     end
-    
+
     # The Commits objects that are reachable via +to+ but not via +from+
     # Commits are returned in chronological order.
     #   +from+ is the branch/commit name of the younger item
@@ -205,7 +205,7 @@ module Grit
     def commits_between(from, to)
       Commit.find_all(self, &quot;#{from}..#{to}&quot;).reverse
     end
-    
+
     # The Commits objects that are newer than the specified date.
     # Commits are returned in chronological order.
     #   +start+ is the branch/commit name (default 'master')
@@ -215,10 +215,10 @@ module Grit
     # Returns Grit::Commit[] (baked)
     def commits_since(start = 'master', since = '1970-01-01', extra_options = {})
       options = {:since =&gt; since}.merge(extra_options)
-      
+
       Commit.find_all(self, start, options)
     end
-    
+
     # The number of commits reachable by the given branch/commit
     #   +start+ is the branch/commit name (default 'master')
     #
@@ -226,17 +226,17 @@ module Grit
     def commit_count(start = 'master')
       Commit.count(self, start)
     end
-    
+
     # The Commit object for the specified id
     #   +id+ is the SHA1 identifier of the commit
     #
     # Returns Grit::Commit (baked)
     def commit(id)
       options = {:max_count =&gt; 1}
-      
+
       Commit.find_all(self, id, options).first
     end
-    
+
     # Returns a list of commits that is in +other_repo+ but not in self
     #
     # Returns Grit::Commit[]
@@ -245,12 +245,12 @@ module Grit
       # rev-list'ing the whole thing
       repo_refs       = self.git.rev_list({}, ref).strip.split(&quot;\n&quot;)
       other_repo_refs = other_repo.git.rev_list({}, other_ref).strip.split(&quot;\n&quot;)
-      
+
       (other_repo_refs - repo_refs).map do |ref|
         Commit.find_all(other_repo, ref, {:max_count =&gt; 1}).first
       end
     end
-    
+
     # The Tree object for the given treeish reference
     #   +treeish+ is the reference (default 'master')
     #   +paths+ is an optional Array of directory paths to restrict the tree (deafult [])
@@ -262,7 +262,7 @@ module Grit
     def tree(treeish = 'master', paths = [])
       Tree.construct(self, treeish, paths)
     end
-    
+
     # The Blob object for the given id
     #   +id+ is the SHA1 id of the blob
     #
@@ -281,7 +281,7 @@ module Grit
       commits = self.git.log(actual_options, *arg)
       Commit.list_from_string(self, commits)
     end
-    
+
     # The diff from commit +a+ to commit +b+, optionally restricted to the given file(s)
     #   +a+ is the base commit
     #   +b+ is the other commit
@@ -289,7 +289,7 @@ module Grit
     def diff(a, b, *paths)
       self.git.diff({}, a, b, '--', *paths)
     end
-    
+
     # The commit diff for the given commit
     #   +commit+ is the commit name/id
     #
@@ -297,7 +297,7 @@ module Grit
     def commit_diff(commit)
       Commit.diff(self, commit)
     end
-    
+
     # Initialize a bare git repository at the given path
     #   +path+ is the full path to the repo (traditionally ends with /&lt;name&gt;.git)
     #   +options+ is any additional options to the git init command
@@ -313,7 +313,7 @@ module Grit
       git.init(git_options)
       self.new(path, repo_options)
     end
-    
+
     # Fork a bare git repository from this repo
     #   +path+ is the full path of the new repo (traditionally ends with /&lt;name&gt;.git)
     #   +options+ is any additional options to the git clone command (:bare and :shared are true by default)
@@ -326,7 +326,7 @@ module Grit
       self.git.clone(real_options, self.path, path)
       Repo.new(path)
     end
-    
+
     # Fork a bare git repository from another repo
     #   +path+ is the full path of the new repo (traditionally ends with /&lt;name&gt;.git)
     #   +options+ is any additional options to the git clone command (:bare and :shared are true by default)
@@ -339,7 +339,7 @@ module Grit
       self.git.clone(real_options, path, self.path)
       Repo.new(self.path)
     end
-    
+
     # Archive the given treeish
     #   +treeish+ is the treeish name/id (default 'master')
     #   +prefix+ is the optional prefix
@@ -360,7 +360,7 @@ module Grit
       options[:prefix] = prefix if prefix
       self.git.archive(options, treeish)
     end
-    
+
     # Archive and gzip the given treeish
     #   +treeish+ is the treeish name/id (default 'master')
     #   +prefix+ is the optional prefix
@@ -404,7 +404,7 @@ module Grit
     def enable_daemon_serve
       self.git.fs_write(DAEMON_EXPORT_FILE, '')
     end
-    
+
     # Disable git-daemon serving of this repository by ensuring there is no
     # git-daemon-export-ok file in its git directory
     #
@@ -412,11 +412,11 @@ module Grit
     def disable_daemon_serve
       self.git.fs_delete(DAEMON_EXPORT_FILE)
     end
-    
+
     def gc_auto
       self.git.gc({:auto =&gt; true})
     end
-    
+
     # The list of alternates for this repo
     #
     # Returns Array[String] (pathnames of alternates)
@@ -428,7 +428,7 @@ module Grit
         []
       end
     end
-    
+
     # Sets the alternates
     #   +alts+ is the Array of String paths representing the alternates
     #
@@ -439,28 +439,28 @@ module Grit
           raise &quot;Could not set alternates. Alternate path #{alt} must exist&quot;
         end
       end
-      
+
       if alts.empty?
         self.git.fs_write('objects/info/alternates', '')
       else
         self.git.fs_write('objects/info/alternates', alts.join(&quot;\n&quot;))
       end
     end
-    
+
     def config
       @config ||= Config.new(self)
     end
-    
+
     def index
       Index.new(self)
     end
-    
+
     def update_ref(head, commit_sha)
       return nil if !commit_sha || (commit_sha.size != 40)
       self.git.fs_write(&quot;refs/heads/#{head}&quot;, commit_sha)
       commit_sha
     end
-    
+
     # Rename the current repository directory.
     #   +name+ is the new name
     #
@@ -472,11 +472,11 @@ module Grit
         self.git.fs_move('/', &quot;../../#{name}&quot;)
       end
     end
-    
+
     # Pretty object inspection
     def inspect
       %Q{#&lt;Grit::Repo &quot;#{@path}&quot;&gt;}
     end
   end # Repo
-  
+
 end # Grit</diff>
      <filename>lib/grit/repo.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-class String 
+class String
   if ((defined? RUBY_VERSION) &amp;&amp; (RUBY_VERSION[0..2] == &quot;1.9&quot;))
     def getord(offset); self[offset].ord; end
   else</diff>
      <filename>lib/grit/ruby1.9.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,20 +1,20 @@
 module Grit
-  
+
   class Status
     include Enumerable
-    
+
     @base = nil
     @files = nil
-    
+
     def initialize(base)
       @base = base
       construct_status
     end
-    
+
     def changed
       @files.select { |k, f| f.type == 'M' }
     end
-    
+
     def added
       @files.select { |k, f| f.type == 'A' }
     end
@@ -22,11 +22,11 @@ module Grit
     def deleted
       @files.select { |k, f| f.type == 'D' }
     end
-    
+
     def untracked
       @files.select { |k, f| f.untracked }
     end
-    
+
     def pretty
       out = ''
       self.each do |file|
@@ -41,26 +41,26 @@ module Grit
       out &lt;&lt; &quot;\n&quot;
       out
     end
-    
+
     # enumerable method
-    
+
     def [](file)
       @files[file]
     end
-    
+
     def each
       @files.each do |k, file|
         yield file
       end
     end
-    
+
     class StatusFile
       attr_accessor :path, :type, :stage, :untracked
       attr_accessor :mode_index, :mode_repo
       attr_accessor :sha_index, :sha_repo
-      
+
       @base = nil
-      
+
       def initialize(base, hash)
         @base = base
         @path = hash[:path]
@@ -72,7 +72,7 @@ module Grit
         @sha_repo = hash[:sha_repo]
         @untracked = hash[:untracked]
       end
-      
+
       def blob(type = :index)
         if type == :repo
           @base.object(@sha_repo)
@@ -80,15 +80,15 @@ module Grit
           @base.object(@sha_index) rescue @base.object(@sha_repo)
         end
       end
-      
+
     end
-    
+
     private
-    
+
       def construct_status
         @files = ls_files
-        
-        Dir.chdir(@base.working_dir) do 
+
+        Dir.chdir(@base.working_dir) do
           # find untracked in working dir
           Dir.glob('**/*') do |file|
             if !@files[file]
@@ -100,12 +100,12 @@ module Grit
          diff_files.each do |path, data|
             @files[path] ? @files[path].merge!(data) : @files[path] = data
           end
-        
+
           # find added but not committed - new files
           diff_index('HEAD').each do |path, data|
             @files[path] ? @files[path].merge!(data) : @files[path] = data
           end
-        
+
           @files.each do |k, file_hash|
             @files[k] = StatusFile.new(@base, file_hash)
           end
@@ -118,7 +118,7 @@ module Grit
         @base.git.diff_files.split(&quot;\n&quot;).each do |line|
           (info, file) = line.split(&quot;\t&quot;)
           (mode_src, mode_dest, sha_src, sha_dest, type) = info.split
-          hsh[file] = {:path =&gt; file, :mode_file =&gt; mode_src.to_s[1, 7], :mode_index =&gt; mode_dest, 
+          hsh[file] = {:path =&gt; file, :mode_file =&gt; mode_src.to_s[1, 7], :mode_index =&gt; mode_dest,
                         :sha_file =&gt; sha_src, :sha_index =&gt; sha_dest, :type =&gt; type}
         end
         hsh
@@ -130,7 +130,7 @@ module Grit
         @base.git.diff_index({}, treeish).split(&quot;\n&quot;).each do |line|
           (info, file) = line.split(&quot;\t&quot;)
           (mode_src, mode_dest, sha_src, sha_dest, type) = info.split
-          hsh[file] = {:path =&gt; file, :mode_repo =&gt; mode_src.to_s[1, 7], :mode_index =&gt; mode_dest, 
+          hsh[file] = {:path =&gt; file, :mode_repo =&gt; mode_src.to_s[1, 7], :mode_index =&gt; mode_dest,
                         :sha_repo =&gt; sha_src, :sha_index =&gt; sha_dest, :type =&gt; type}
         end
         hsh
@@ -147,5 +147,5 @@ module Grit
         hsh
       end
   end
-  
+
 end
\ No newline at end of file</diff>
      <filename>lib/grit/status.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,10 +1,10 @@
 module Grit
-  
+
   class Submodule
     attr_reader :id
     attr_reader :mode
     attr_reader :name
-    
+
     # Create a Submodule containing just the specified attributes
     #   +repo+ is the Repo
     #   +atts+ is a Hash of instance variable data
@@ -13,7 +13,7 @@ module Grit
     def self.create(repo, atts)
       self.allocate.create_initialize(repo, atts)
     end
-    
+
     # Initializer for Submodule.create
     #   +repo+ is the Repo
     #   +atts+ is a Hash of instance variable data
@@ -26,23 +26,23 @@ module Grit
       end
       self
     end
-    
+
     # The url of this submodule
     #   +ref+ is the committish that should be used to look up the url
     #
     # Returns String
     def url(ref)
       config = self.class.config(@repo, ref)
-      
+
       lookup = config.keys.inject({}) do |acc, key|
         id = config[key]['id']
         acc[id] = config[key]['url']
         acc
       end
-      
+
       lookup[@id]
     end
-    
+
     # The configuration information for the given +repo+
     #   +repo+ is the Repo
     #   +ref+ is the committish (defaults to 'master')
@@ -53,12 +53,12 @@ module Grit
       commit = repo.commit(ref)
       blob = commit.tree/'.gitmodules'
       return {} unless blob
-      
+
       lines = blob.data.gsub(/\r\n?/, &quot;\n&quot; ).split(&quot;\n&quot;)
-      
+
       config = {}
       current = nil
-      
+
       lines.each do |line|
         if line =~ /^\[submodule &quot;(.+)&quot;\]$/
           current = $1
@@ -71,18 +71,18 @@ module Grit
           # ignore
         end
       end
-      
+
       config
     end
-    
+
     def basename
       File.basename(name)
-    end    
-    
+    end
+
     # Pretty object inspection
     def inspect
       %Q{#&lt;Grit::Submodule &quot;#{@id}&quot;&gt;}
     end
   end # Submodule
-  
+
 end # Grit
\ No newline at end of file</diff>
      <filename>lib/grit/submodule.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,11 +1,11 @@
 module Grit
-  
+
   class Tree
     lazy_reader :contents
     attr_reader :id
     attr_reader :mode
     attr_reader :name
-    
+
     # Construct the contents of the tree
     #   +repo+ is the Repo
     #   +treeish+ is the reference
@@ -16,12 +16,12 @@ module Grit
       output = repo.git.ls_tree({}, treeish, *paths)
       self.allocate.construct_initialize(repo, treeish, output)
     end
-    
+
     def construct_initialize(repo, id, text)
       @repo = repo
       @id = id
       @contents = []
-      
+
       text.split(&quot;\n&quot;).each do |line|
         @contents &lt;&lt; content_from_string(repo, line)
       end
@@ -29,11 +29,11 @@ module Grit
 
       self
     end
-    
+
     def lazy_source
       Tree.construct(@repo, @id, [])
     end
-    
+
     # Create an unbaked Tree containing just the specified attributes
     #   +repo+ is the Repo
     #   +atts+ is a Hash of instance variable data
@@ -42,7 +42,7 @@ module Grit
     def self.create(repo, atts)
       self.allocate.create_initialize(repo, atts)
     end
-    
+
     # Initializer for Tree.create
     #   +repo+ is the Repo
     #   +atts+ is a Hash of instance variable data
@@ -50,13 +50,13 @@ module Grit
     # Returns Grit::Tree (unbaked)
     def create_initialize(repo, atts)
       @repo = repo
-      
+
       atts.each do |k, v|
         instance_variable_set(&quot;@#{k}&quot;, v)
       end
       self
     end
-    
+
     # Parse a content item and create the appropriate object
     #   +repo+ is the Repo
     #   +text+ is the single line containing the items data in `git ls-tree` format
@@ -77,7 +77,7 @@ module Grit
           raise &quot;Invalid type: #{type}&quot;
       end
     end
-    
+
     # Find the named object in this tree's contents
     #
     # Examples
@@ -94,11 +94,11 @@ module Grit
         self.contents.find { |c| c.name == file }
       end
     end
-    
+
     def basename
       File.basename(name)
     end
-    
+
     # Pretty object inspection
     def inspect
       %Q{#&lt;Grit::Tree &quot;#{@id}&quot;&gt;}</diff>
      <filename>lib/grit/tree.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,25 +2,25 @@ require File.dirname(__FILE__) + '/helper'
 
 class TestActor &lt; Test::Unit::TestCase
   def setup
-    
+
   end
-  
+
   # from_string
-  
+
   def test_from_string_should_separate_name_and_email
     a = Actor.from_string(&quot;Tom Werner &lt;tom@example.com&gt;&quot;)
     assert_equal &quot;Tom Werner&quot;, a.name
     assert_equal &quot;tom@example.com&quot;, a.email
   end
-  
+
   def test_from_string_should_handle_just_name
     a = Actor.from_string(&quot;Tom Werner&quot;)
     assert_equal &quot;Tom Werner&quot;, a.name
     assert_equal nil, a.email
   end
-  
+
   # inspect
-  
+
   def test_inspect
     a = Actor.from_string(&quot;Tom Werner &lt;tom@example.com&gt;&quot;)
     assert_equal %Q{#&lt;Grit::Actor &quot;Tom Werner &lt;tom@example.com&gt;&quot;&gt;}, a.inspect</diff>
      <filename>test/test_actor.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,19 +2,19 @@ require File.dirname(__FILE__) + '/helper'
 require 'pp'
 
 class TestBlameTree &lt; Test::Unit::TestCase
-  
+
   def setup
     @git = Git.new(File.join(File.dirname(__FILE__), *%w[dot_git]))
   end
 
-  def test_blame_tree    
+  def test_blame_tree
     commit = '2d3acf90f35989df8f262dc50beadc4ee3ae1560'
     tree = @git.blame_tree(commit)
     last_commit_sha = tree['History.txt']
     assert_equal last_commit_sha, '7bcc0ee821cdd133d8a53e8e7173a334fef448aa'
   end
 
-  def test_blame_tree_path   
+  def test_blame_tree_path
     commit = '2d3acf90f35989df8f262dc50beadc4ee3ae1560'
     tree = @git.blame_tree(commit, 'lib')
     last_commit_sha = tree['lib/grit.rb']
@@ -29,5 +29,5 @@ class TestBlameTree &lt; Test::Unit::TestCase
     last_commit_sha = tree['lib/grit/diff.rb']
     assert_equal last_commit_sha, '22825175e37f22c9418d756ca69b574d75602994'
   end
-  
+
 end
\ No newline at end of file</diff>
      <filename>test/test_blame_tree.rb</filename>
    </modified>
    <modified>
      <diff>@@ -75,7 +75,7 @@ class TestBlob &lt; Test::Unit::TestCase
     @b = Blob.create(@r, :id =&gt; 'abc')
     assert_equal %Q{#&lt;Grit::Blob &quot;abc&quot;&gt;}, @b.inspect
   end
-  
+
   def test_basename
     @b = Blob.create(@r, :name =&gt; 'foo/bar.rb')
     assert_equal &quot;bar.rb&quot;, @b.basename</diff>
      <filename>test/test_blob.rb</filename>
    </modified>
    <modified>
      <diff>@@ -165,7 +165,7 @@ class TestCommit &lt; Test::Unit::TestCase
     @c = Commit.create(@r, :id =&gt; '80f136f500dfdb8c3e8abf4ae716f875f0a1b57f')
 
     patch = @c.to_patch
-    
+
     assert patch.include?('From 80f136f500dfdb8c3e8abf4ae716f875f0a1b57f Mon Sep 17 00:00:00 2001')
     assert patch.include?('From: tom &lt;tom@taco.(none)&gt;')
     assert patch.include?('Date: Tue, 20 Nov 2007 17:27:42 -0800')</diff>
      <filename>test/test_commit.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 require File.dirname(__FILE__) + '/helper'
 
 class TestCommitStats &lt; Test::Unit::TestCase
-  
+
   def setup
     File.expects(:exist?).returns(true)
     @r = Repo.new(GRIT_REPO)
@@ -9,7 +9,7 @@ class TestCommitStats &lt; Test::Unit::TestCase
     Git.any_instance.expects(:log).returns(fixture('log'))
     @stats = @r.commit_stats
   end
-  
+
   def test_commit_stats
     assert_equal 3, @stats.size
   end</diff>
      <filename>test/test_commit_stats.rb</filename>
    </modified>
    <modified>
      <diff>@@ -16,5 +16,5 @@ class TestCommitWrite &lt; Test::Unit::TestCase
     results = @r.commit_all('my message')
     assert_match /Created commit/, results
   end
-  
+
 end</diff>
      <filename>test/test_commit_write.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,54 +4,54 @@ class TestConfig &lt; Test::Unit::TestCase
   def setup
     @r = Repo.new(GRIT_REPO)
   end
-  
+
   # data
-  
+
   def test_bracketed_fetch
     Git.any_instance.expects(:config).returns(fixture('simple_config'))
-    
+
     config = @r.config
-    
+
     assert_equal &quot;git://github.com/mojombo/grit.git&quot;, config[&quot;remote.origin.url&quot;]
   end
-  
+
   def test_bracketed_fetch_returns_nil
     Git.any_instance.expects(:config).returns(fixture('simple_config'))
-    
+
     config = @r.config
-    
+
     assert_equal nil, config[&quot;unknown&quot;]
   end
-  
+
   def test_fetch
     Git.any_instance.expects(:config).returns(fixture('simple_config'))
-    
+
     config = @r.config
-    
+
     assert_equal &quot;false&quot;, config.fetch(&quot;core.bare&quot;)
   end
-  
+
   def test_fetch_with_default
     Git.any_instance.expects(:config).returns(fixture('simple_config'))
-    
+
     config = @r.config
-    
+
     assert_equal &quot;default&quot;, config.fetch(&quot;unknown&quot;, &quot;default&quot;)
   end
 
   def test_fetch_without_default_raises
     Git.any_instance.expects(:config).returns(fixture('simple_config'))
-    
+
     config = @r.config
-    
+
     assert_raise(IndexError) do
       config.fetch(&quot;unknown&quot;)
     end
   end
-  
+
   def test_set_value
     Git.any_instance.expects(:config).with({}, 'unknown', 'default')
-    
+
     config = @r.config
     config[&quot;unknown&quot;] = &quot;default&quot;
   end</diff>
      <filename>test/test_config.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,12 +4,12 @@ class TestDiff &lt; Test::Unit::TestCase
   def setup
     @r = Repo.new(GRIT_REPO)
   end
-  
+
   # list_from_string
-  
+
   def test_list_from_string_new_mode
     output = fixture('diff_new_mode')
-    
+
     diffs = Grit::Diff.list_from_string(@r, output)
     assert_equal 2, diffs.size
     assert_equal 10, diffs.first.diff.split(&quot;\n&quot;).size</diff>
      <filename>test/test_diff.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,13 +1,13 @@
 require File.dirname(__FILE__) + '/helper'
 
 class TestFileIndex &lt; Test::Unit::TestCase
-  
+
   def setup_a
     @findex = Grit::GitRuby::FileIndex.new(File.join(File.dirname(__FILE__), *%w[dot_git]))
     @commit = 'c12f398c2f3c4068ca5e01d736b1c9ae994b2138'
   end
 
-  def test_count_all 
+  def test_count_all
     setup_a
     assert_equal 107, @findex.count_all
   end
@@ -38,7 +38,7 @@ class TestFileIndex &lt; Test::Unit::TestCase
     assert_equal @commit, arr['lib/grit/commit.rb']
     assert_equal nil, arr['lib/grit/actor.rb']
   end
-  
+
   def test_last_commits_pattern
     setup_a
     arr = @findex.last_commits(@commit, /lib\/grit\/[^\/]*$/)
@@ -46,11 +46,11 @@ class TestFileIndex &lt; Test::Unit::TestCase
     assert_equal @commit, arr['lib/grit/commit.rb']
     assert_equal nil, arr['lib/grit/actor.rb']
   end
-  
+
   def test_last_commits_array
     setup_a
     arr = @findex.last_commits(@commit, ['lib/grit.rb', 'lib/grit/'])
     assert_equal @commit, arr['lib/grit/']
   end
-  
+
 end
\ No newline at end of file</diff>
      <filename>test/test_file_index.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,7 +4,7 @@ class TestGit &lt; Test::Unit::TestCase
   def setup
     @git = Git.new(File.join(File.dirname(__FILE__), *%w[..]))
   end
-  
+
   def teardown
     Grit.debug = false
   end
@@ -12,29 +12,29 @@ class TestGit &lt; Test::Unit::TestCase
   def test_method_missing
     assert_match(/^git version [\w\.]*$/, @git.version)
   end
-  
+
   def test_logs_stderr
     Grit.debug = true
     Grit.stubs(:log)
     Grit.expects(:log).with(includes(&quot;git: 'bad' is not a git-command&quot;))
     @git.bad
   end
-  
-  def testl_logs_stderr_when_skipping_timeout 
+
+  def testl_logs_stderr_when_skipping_timeout
     Grit.debug = true
     Grit.stubs(:log)
     Grit.expects(:log).with(includes(&quot;git: 'bad' is not a git-command&quot;))
     @git.bad :timeout =&gt; false
   end
-  
+
   def test_transform_options
     assert_equal [&quot;-s&quot;], @git.transform_options({:s =&gt; true})
     assert_equal [], @git.transform_options({:s =&gt; false})
     assert_equal [&quot;-s '5'&quot;], @git.transform_options({:s =&gt; 5})
-    
+
     assert_equal [&quot;--max-count&quot;], @git.transform_options({:max_count =&gt; true})
     assert_equal [&quot;--max-count='5'&quot;], @git.transform_options({:max_count =&gt; 5})
-    
+
     assert_equal [&quot;-s&quot;, &quot;-t&quot;], @git.transform_options({:s =&gt; true, :t =&gt; true}).sort
   end
 
@@ -62,34 +62,34 @@ class TestGit &lt; Test::Unit::TestCase
     end
     Grit::Git.git_timeout = 5.0
   end
-  
+
   def test_it_really_shell_escapes_arguments_to_the_git_shell
     @git.expects(:sh).with(&quot;#{Git.git_binary} --git-dir='#{@git.git_dir}' foo --bar='bazz\\'er'&quot;)
     @git.foo(:bar =&gt; &quot;bazz'er&quot;)
     @git.expects(:sh).with(&quot;#{Git.git_binary} --git-dir='#{@git.git_dir}' bar -x 'quu\\'x'&quot;)
     @git.bar(:x =&gt; &quot;quu'x&quot;)
   end
-  
+
   def test_it_shell_escapes_the_standalone_argument
     @git.expects(:sh).with(&quot;#{Git.git_binary} --git-dir='#{@git.git_dir}' foo 'bar\\'s'&quot;)
     @git.foo({}, &quot;bar's&quot;)
-    
+
     @git.expects(:sh).with(&quot;#{Git.git_binary} --git-dir='#{@git.git_dir}' foo 'bar' '\\; echo \\'noooo\\''&quot;)
     @git.foo({}, &quot;bar&quot;, &quot;; echo 'noooo'&quot;)
   end
-  
+
   def test_piping_should_work_on_1_9
     @git.expects(:sh).with(&quot;#{Git.git_binary} --git-dir='#{@git.git_dir}' archive 'master' | gzip&quot;)
     @git.archive({}, &quot;master&quot;, &quot;| gzip&quot;)
   end
-  
+
   def test_fs_read
     f = stub
     f.expects(:read).returns('bar')
     File.expects(:open).with(File.join(@git.git_dir, 'foo')).returns(f)
     assert_equal 'bar', @git.fs_read('foo')
   end
-  
+
   def test_fs_write
     f = stub
     f.expects(:write).with('baz')
@@ -97,7 +97,7 @@ class TestGit &lt; Test::Unit::TestCase
     File.expects(:open).with(File.join(@git.git_dir, 'foo/bar'), 'w').yields(f)
     @git.fs_write('foo/bar', 'baz')
   end
-  
+
   def test_fs_delete
     FileUtils.expects(:rm_rf).with(File.join(@git.git_dir, 'foo'))
     @git.fs_delete('foo')</diff>
      <filename>test/test_git.rb</filename>
    </modified>
    <modified>
      <diff>@@ -6,16 +6,16 @@ class TestGrit &lt; Test::Unit::TestCase
     @old_logger = Grit.logger
     Grit.debug  = true
   end
-  
+
   def teardown
     Grit.debug  = @old_debug
     Grit.logger = @old_logger
-  end 
-  
+  end
+
   def test_uses_stdout_logger_by_default
     assert_equal STDOUT, Grit.logger.instance_variable_get(:@logdev).dev
   end
-  
+
   def test_can_override_logger
     my_logger = Logger.new(io = StringIO.new)
     Grit.logger = my_logger
@@ -28,5 +28,5 @@ class TestGrit &lt; Test::Unit::TestCase
     io.rewind
     assert io.read.include?('hi mom')
   end
-  
+
 end
\ No newline at end of file</diff>
      <filename>test/test_grit.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,9 +4,9 @@ class TestHead &lt; Test::Unit::TestCase
   def setup
     @r = Repo.new(File.join(File.dirname(__FILE__), *%w[dot_git]), :is_bare =&gt; true)
   end
-  
+
   # inspect
-  
+
   def test_inspect
     head = @r.heads[1]
     assert_equal %Q{#&lt;Grit::Head &quot;test/master&quot;&gt;}, head.inspect
@@ -21,14 +21,14 @@ class TestHead &lt; Test::Unit::TestCase
     head = @r.commit('test/master')
     assert_equal '2d3acf90f35989df8f262dc50beadc4ee3ae1560', head.id
   end
-  
+
   # heads with slashes
 
   def test_heads_with_slashes
     head = @r.heads[3]
     assert_equal %Q{#&lt;Grit::Head &quot;test/chacon&quot;&gt;}, head.inspect
   end
-  
+
   def test_is_head
     assert @r.is_head?('master')
     assert @r.is_head?('test/chacon')</diff>
      <filename>test/test_head.rb</filename>
    </modified>
    <modified>
      <diff>@@ -14,7 +14,7 @@ class TestIndexStatus &lt; Test::Unit::TestCase
     Git.any_instance.expects(:add).with({}, 'file1', 'file2')
     @r.add(['file1', 'file2'])
   end
-  
+
   def test_remove
     Git.any_instance.expects(:rm).with({}, 'file1', 'file2')
     @r.remove('file1', 'file2')
@@ -35,6 +35,6 @@ class TestIndexStatus &lt; Test::Unit::TestCase
     assert_equal stat.mode_repo, &quot;100644&quot;
     assert_equal stat.type, &quot;M&quot;
   end
-  
-  
+
+
 end
\ No newline at end of file</diff>
      <filename>test/test_index_status.rb</filename>
    </modified>
    <modified>
      <diff>@@ -7,7 +7,7 @@ class TestMerge &lt; Test::Unit::TestCase
     @r = Repo.new(File.join(File.dirname(__FILE__), *%w[dot_git]), :is_bare =&gt; true)
     @merge = fixture('merge_result')
   end
-  
+
   def test_from_string
     m = Grit::Merge.new(@merge)
     assert_equal m.sections, 3</diff>
      <filename>test/test_merge.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,15 +2,15 @@ require File.dirname(__FILE__) + '/helper'
 require 'pp'
 
 class TestFileIndex &lt; Test::Unit::TestCase
-  
+
   def setup
     @r = Grit::Repo.new(File.join(File.dirname(__FILE__), *%w[dot_git]), :is_bare =&gt; true)
     @tag = 'f0055fda16c18fd8b27986dbf038c735b82198d7'
   end
-  
+
   def test_raw_tag
     tag = @r.git.ruby_git.get_object_by_sha1(@tag)
     assert_match Regexp.new('v0.7.0'),  tag.raw_content
   end
-  
+
 end
\ No newline at end of file</diff>
      <filename>test/test_raw.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,19 +1,19 @@
 # require File.dirname(__FILE__) + '/helper'
-# 
+#
 # class TestReal &lt; Test::Unit::TestCase
 #   def setup
 #     `rm -fr /Users/tom/dev/sandbox/grittest.git`
 #     `git --git-dir=/Users/tom/dev/sandbox/grittest.git init`
 #     @repo = Repo.new('/Users/tom/dev/sandbox/grittest.git')
 #   end
-#   
+#
 #   def test_real
 #     Grit.debug = true
-#     
+#
 #     index = @repo.index
 #     index.add('foo/bar/baz.txt', 'hello!')
 #     index.add('foo/qux/bam.txt', 'world!')
-#     
+#
 #     puts index.commit('first commit')
 #   end
 # end
\ No newline at end of file</diff>
      <filename>test/test_real.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,10 +4,10 @@ require File.dirname(__FILE__) + '/helper'
 #   def test_
 #     r = Repo.new(&quot;/Users/tom/dev/god&quot;)
 #     t = r.tree(&quot;HEAD&quot;)
-#     
+#
 #     recurse(t)
 #   end
-#   
+#
 #   def recurse(tree, indent = &quot;&quot;)
 #     tree.contents.each do |c|
 #       # puts &quot;#{indent}#{c.name} (#{c.id})&quot;</diff>
      <filename>test/test_reality.rb</filename>
    </modified>
    <modified>
      <diff>@@ -12,31 +12,31 @@ class TestRepo &lt; Test::Unit::TestCase
     FileUtils.cp_r(clone_path, tmp_path)
     File.join(tmp_path, 'dot_git')
   end
-  
+
   def test_update_refs_packed
     gpath = create_temp_repo(File.join(File.dirname(__FILE__), *%w[dot_git]))
     @git = Grit::Repo.new(gpath, :is_bare =&gt; true)
-    
+
     # new and existing
     test   = 'ac9a30f5a7f0f163bbe3b6f0abf18a6c83b06872'
     master = 'ca8a30f5a7f0f163bbe3b6f0abf18a6c83b0687a'
-    
+
     @git.update_ref('testref', test)
     new_t = @git.get_head('testref').commit.sha
     assert new_t != master
-    
+
     @git.update_ref('master', test)
     new_m = @git.get_head('master').commit.sha
     assert new_m != master
-    
+
     old = @git.get_head('nonpack').commit.sha
     @git.update_ref('nonpack', test)
     newp = @git.get_head('nonpack').commit.sha
     assert newp != old
-    
+
     FileUtils.rm_r(gpath)
   end
-  
+
   # new
 
   def test_new_should_raise_on_invalid_repo_location
@@ -84,7 +84,7 @@ class TestRepo &lt; Test::Unit::TestCase
   def test_heads_should_populate_head_data
     @r = Repo.new(File.join(File.dirname(__FILE__), *%w[dot_git]), :is_bare =&gt; true)
     head = @r.heads[1]
-    
+
     assert_equal 'test/master', head.name
     assert_equal '2d3acf90f35989df8f262dc50beadc4ee3ae1560', head.commit.id
   end
@@ -250,7 +250,7 @@ class TestRepo &lt; Test::Unit::TestCase
     Git.any_instance.expects(:gc).with({:auto =&gt; true})
     @r.gc_auto
   end
-  
+
   # alternates
 
   def test_alternates_with_two_alternates
@@ -320,18 +320,18 @@ class TestRepo &lt; Test::Unit::TestCase
     Git.any_instance.expects(:log).with({:pretty =&gt; 'raw', :max_count =&gt; 1}, 'master', '--', 'file.rb').returns(fixture('rev_list'))
     @r.log('master', 'file.rb', :max_count =&gt; 1)
   end
-  
+
   # commit_deltas_from
-  
+
   def test_commit_deltas_from_nothing_new
     other_repo = Repo.new(GRIT_REPO)
     @r.git.expects(:rev_list).with({}, &quot;master&quot;).returns(fixture(&quot;rev_list_delta_b&quot;))
     other_repo.git.expects(:rev_list).with({}, &quot;master&quot;).returns(fixture(&quot;rev_list_delta_a&quot;))
-    
+
     delta_blobs = @r.commit_deltas_from(other_repo)
     assert_equal 0, delta_blobs.size
   end
-  
+
   def test_commit_deltas_from_when_other_has_new
     other_repo = Repo.new(GRIT_REPO)
     @r.git.expects(:rev_list).with({}, &quot;master&quot;).returns(fixture(&quot;rev_list_delta_a&quot;))</diff>
      <filename>test/test_repo.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@ require File.dirname(__FILE__) + '/helper'
 require 'tempfile'
 
 class TestRubyGit &lt; Test::Unit::TestCase
-  
+
   def setup
     @git = Git.new(File.join(File.dirname(__FILE__), *%w[dot_git]))
     @commit_sha = '5e3ee1198672257164ce3fe31dea3e40848e68d5'
@@ -14,12 +14,12 @@ class TestRubyGit &lt; Test::Unit::TestCase
     tf = Tempfile.new('gitdir')
     temppath = tf.path
     tf.unlink
-    
+
     git = Git.new(temppath)
     git.init({})
     assert File.exists?(File.join(temppath, 'config'))
   end
-  
+
   def test_log_merge
     c1 = '420eac97a826bfac8724b6b0eef35c20922124b7'
     c2 = '30e367cef2203eba2b341dc9050993b06fd1e108'
@@ -32,7 +32,7 @@ class TestRubyGit &lt; Test::Unit::TestCase
     out = @git.rev_list({:max_count =&gt; 10}, 'master')
     assert_equal 10, out.split(&quot;\n&quot;).size
   end
-  
+
   def test_diff
     commit1 = '2d3acf90f35989df8f262dc50beadc4ee3ae1560'
     commit2 = '420eac97a826bfac8724b6b0eef35c20922124b7'
@@ -139,7 +139,7 @@ class TestRubyGit &lt; Test::Unit::TestCase
     out = @git.rev_list({}, 'master')
     assert_equal out, fixture('rev_list_lines')
   end
-  
+
   def test_rev_list_range
     range = '30e367cef2203eba2b341dc9050993b06fd1e108..3fa4e130fa18c92e3030d4accb5d3e0cadd40157'
     out = @git.rev_list({}, range)
@@ -157,13 +157,13 @@ class TestRubyGit &lt; Test::Unit::TestCase
     out = @git.ls_tree({}, @tree_sha, paths)
     assert_equal out, &quot;100644 blob 6afcf64c80da8253fa47228eb09bc0eea217e5d1\tlib/grit.rb\n040000 tree 6244414d0229fb2bd58bc426a2afb5ba66773498\tlib/grit&quot;
   end
-  
+
   def test_ls_tree_path_deep
     paths = ['lib/grit/']
     out = @git.ls_tree({}, @tree_sha, paths)
     assert_equal out, fixture('ls_tree_subdir').chomp
   end
-  
+
   def test_file_type
     out = @git.file_type(@tree_sha).to_s
     assert_equal 'tree', out
@@ -172,21 +172,21 @@ class TestRubyGit &lt; Test::Unit::TestCase
     out = @git.file_type(@commit_sha).to_s
     assert_equal 'commit', out
   end
-  
+
   #def test_ls_tree_noexist
   #  puts out = @git.ls_tree({}, '6afcf64c80da8253fa47228eb09bc0eea217e5d0')
   #end
-  
-  
+
+
 =begin
   def test_ls_tree_grit_tree
     paths = ['lib/grit.rb']
-    @repo = Grit::Repo.new('~/projects/github')    
+    @repo = Grit::Repo.new('~/projects/github')
     paths = ['app/models/event.rb']
     puts out = @repo.git.ls_tree({}, 'master', ['app/models/event.rb'])
     puts out = @repo.tree('master', paths).contents
     assert_equal out, '100644 blob 6afcf64c80da8253fa47228eb09bc0eea217e5d1	lib/grit.rb'
   end
 =end
-  
+
 end</diff>
      <filename>test/test_rubygit.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@ require File.dirname(__FILE__) + '/helper'
 require 'pp'
 
 class TestRubyGitAlt &lt; Test::Unit::TestCase
-  
+
   def setup
     @git1 = Grit::Repo.new(File.join(File.dirname(__FILE__), *%w[dot_git]), :is_bare =&gt; true)
     @git2 = Grit::Repo.new(File.join(File.dirname(__FILE__), *%w[dot_git_clone]), :is_bare =&gt; true)
@@ -11,7 +11,7 @@ class TestRubyGitAlt &lt; Test::Unit::TestCase
     @tree_sha = 'cd7422af5a2e0fff3e94d6fb1a8fff03b2841881'
     @blob_sha = '4232d073306f01cf0b895864e5a5cfad7dd76fce'
   end
-  
+
   def test_basic
     sha_hex = [@commit_sha].pack(&quot;H*&quot;)
     assert @git1.git.ruby_git.in_loose?(sha_hex)
@@ -21,7 +21,7 @@ class TestRubyGitAlt &lt; Test::Unit::TestCase
     assert_equal 10, @git1.commits.size
     assert_equal 10, @git2.commits.size
   end
-  
+
   def test_clone_of_clone
     sha_hex = [@commit_sha].pack(&quot;H*&quot;)
     assert @git2.git.ruby_git.in_loose?(sha_hex)
@@ -31,10 +31,10 @@ class TestRubyGitAlt &lt; Test::Unit::TestCase
     assert_equal 10, @git2.commits.size
     assert_equal 10, @git3.commits.size
   end
-  
+
   def test_tree_path
-    file = @git2.tree('master', ['test/test_head.rb']).contents.first.name    
+    file = @git2.tree('master', ['test/test_head.rb']).contents.first.name
     assert_equal file, 'test/test_head.rb'
   end
-  
+
 end
\ No newline at end of file</diff>
      <filename>test/test_rubygit_alt.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,18 +2,18 @@ require File.dirname(__FILE__) + '/helper'
 require 'pp'
 
 class TestRubyGitIndex &lt; Test::Unit::TestCase
-  
+
   def setup
     @base_repo = create_temp_repo(File.join(File.dirname(__FILE__), *%w[dot_git_iv2]))
     @git = Grit::Repo.new(@base_repo, :is_bare =&gt; true)
     @rgit = @git.git.ruby_git
     @user = Actor.from_string(&quot;Tom Werner &lt;tom@example.com&gt;&quot;)
   end
-  
+
   def teardown
     FileUtils.rm_r(@base_repo)
   end
-  
+
   def create_temp_repo(clone_path)
     filename = 'git_test' + Time.now.to_i.to_s + rand(300).to_s.rjust(3, '0')
     tmp_path = File.join(&quot;/tmp/&quot;, filename)
@@ -21,55 +21,55 @@ class TestRubyGitIndex &lt; Test::Unit::TestCase
     FileUtils.cp_r(clone_path, tmp_path)
     File.join(tmp_path, 'dot_git_iv2')
   end
-  
+
   def test_add_files
     sha = @git.commits.first.tree.id
-    
+
     i = @git.index
     i.read_tree(sha)
     i.add('atester.rb', 'test stuff')
-    i.commit('message', [@git.commits.first], @user, nil, 'master')    
-    
+    i.commit('message', [@git.commits.first], @user, nil, 'master')
+
     b = @git.commits.first.tree/'atester.rb'
     assert_equal 'f80c3b68482d5e1c8d24c9b8139340f0d0a928d0', b.id
   end
-  
+
   def test_add_path_file
     sha = @git.commits.first.tree.id
-    
+
     i = @git.index
     i.read_tree(sha)
     i.add('lib/atester.rb', 'test stuff')
-    i.commit('message', [@git.commits.first], @user, nil, 'master')    
-    
+    i.commit('message', [@git.commits.first], @user, nil, 'master')
+
     b = @git.commits.first.tree/'lib'/'atester.rb'
     assert_equal 'f80c3b68482d5e1c8d24c9b8139340f0d0a928d0', b.id
     b = @git.commits.first.tree/'lib'/'grit.rb'
     assert_equal '77aa887449c28a922a660b2bb749e4127f7664e5', b.id
   end
-  
+
   def test_ordered_properly
     sha = @git.commits.first.tree.id
-    
+
     i = @git.index
     i.read_tree(sha)
     i.add('lib.rb', 'test stuff')
-    i.commit('message', [@git.commits.first], @user, nil, 'master')    
-    
+    i.commit('message', [@git.commits.first], @user, nil, 'master')
+
     tr = @git.commits.first.tree.contents
     entries = tr.select { |c| c.name[0, 3] == 'lib' }.map { |c| c.name }
     assert_equal 'lib.rb', entries[0]
-    assert_equal 'lib', entries[1] 
+    assert_equal 'lib', entries[1]
   end
-  
+
   def test_modify_file
     sha = @git.commits.first.tree.id
-    
+
     i = @git.index
     i.read_tree(sha)
     i.add('README.txt', 'test more stuff')
-    i.commit('message', [@git.commits.first], @user, nil, 'master')    
-    
+    i.commit('message', [@git.commits.first], @user, nil, 'master')
+
     b = @git.commits.first.tree/'README.txt'
     assert_equal 'e45d6b418e34951ddaa3e78e4fc4d3d92a46d3d1', b.id
   end</diff>
      <filename>test/test_rubygit_index.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@ require File.dirname(__FILE__) + '/helper'
 require 'pp'
 
 class TestRubyGitIv2 &lt; Test::Unit::TestCase
-  
+
   def setup
     @git = Grit::Repo.new(File.join(File.dirname(__FILE__), *%w[dot_git_iv2]), :is_bare =&gt; true)
     @rgit = @git.git.ruby_git
@@ -15,7 +15,7 @@ class TestRubyGitIv2 &lt; Test::Unit::TestCase
     assert @rgit.object_exists?(@commit_sha)
     assert_equal 10, @git.commits.size
   end
-  
+
   def test_objects
     commit = @rgit.get_object_by_sha1(@commit_sha)
     assert_equal commit.author.email, 'schacon@gmail.com'
@@ -24,5 +24,5 @@ class TestRubyGitIv2 &lt; Test::Unit::TestCase
     blob = @rgit.get_object_by_sha1(@blob_sha)
     assert_match 'First public release', blob.content
   end
-    
+
 end
\ No newline at end of file</diff>
      <filename>test/test_rubygit_iv2.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,63 +5,63 @@ class TestSubmodule &lt; Test::Unit::TestCase
     @r = Repo.new(GRIT_REPO)
     @s = Submodule.allocate
   end
-  
+
   # config
-  
+
   def test_config
     data = fixture('gitmodules')
     blob = stub(:data =&gt; data, :id =&gt; 'abc')
     tree = stub(:'/' =&gt; blob)
     commit = stub(:tree =&gt; tree)
     repo = stub(:commit =&gt; commit)
-    
+
     config = Submodule.config(repo)
-    
+
     assert_equal &quot;git://github.com/mojombo/glowstick&quot;, config['test/glowstick']['url']
     assert_equal &quot;git://github.com/mojombo/god&quot;, config['god']['url']
   end
-  
+
   def test_config_with_windows_lineendings
     data = fixture('gitmodules').gsub(/\n/, &quot;\r\n&quot;)
     blob = stub(:data =&gt; data, :id =&gt; 'abc')
     tree = stub(:'/' =&gt; blob)
     commit = stub(:tree =&gt; tree)
     repo = stub(:commit =&gt; commit)
-    
+
     config = Submodule.config(repo)
-    
+
     assert_equal &quot;git://github.com/mojombo/glowstick&quot;, config['test/glowstick']['url']
     assert_equal &quot;git://github.com/mojombo/god&quot;, config['god']['url']
   end
-  
+
   def test_no_config
     tree = stub(:'/' =&gt; nil)
     commit = stub(:tree =&gt; tree)
     repo = stub(:commit =&gt; commit)
-    
+
     config = Submodule.config(repo)
-    
+
     assert_equal({}, config)
   end
-  
+
   def test_empty_config
     blob = stub(:data =&gt; '', :id =&gt; 'abc')
     tree = stub(:'/' =&gt; blob)
     commit = stub(:tree =&gt; tree)
     repo = stub(:commit =&gt; commit)
-    
+
     config = Submodule.config(repo)
-    
+
     assert_equal({}, config)
   end
-  
+
   # inspect
-  
+
   def test_inspect
     @t = Submodule.create(@r, :id =&gt; 'abc')
     assert_equal %Q{#&lt;Grit::Submodule &quot;abc&quot;&gt;}, @t.inspect
   end
-  
+
   def test_basename
     @submodule = Submodule.create(@r, :name =&gt; 'foo/bar')
     assert_equal &quot;bar&quot;, @submodule.basename</diff>
      <filename>test/test_submodule.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,95 +5,95 @@ class TestTree &lt; Test::Unit::TestCase
     @r = Repo.new(GRIT_REPO)
     @t = Tree.allocate
   end
-  
+
   # contents
   def test_nosuch_tree
     t = @r.tree('blahblah')
     assert t.contents.is_a?(Array)
     assert t.is_a?(Tree)
   end
-  
+
   def test_contents_should_cache
     Git.any_instance.expects(:ls_tree).returns(
       fixture('ls_tree_a'),
       fixture('ls_tree_b')
     ).times(2)
     tree = @r.tree('master')
-    
+
     child = tree.contents.last
-    
+
     child.contents
     child.contents
   end
-  
+
   # content_from_string
-  
+
   def test_content_from_string_tree_should_return_tree
     text = fixture('ls_tree_a').split(&quot;\n&quot;).last
-    
+
     tree = @t.content_from_string(nil, text)
-    
+
     assert_equal Tree, tree.class
     assert_equal &quot;650fa3f0c17f1edb4ae53d8dcca4ac59d86e6c44&quot;, tree.id
     assert_equal &quot;040000&quot;, tree.mode
     assert_equal &quot;test&quot;, tree.name
   end
-  
+
   def test_content_from_string_tree_should_return_blob
     text = fixture('ls_tree_b').split(&quot;\n&quot;).first
-    
+
     tree = @t.content_from_string(nil, text)
-    
+
     assert_equal Blob, tree.class
     assert_equal &quot;aa94e396335d2957ca92606f909e53e7beaf3fbb&quot;, tree.id
     assert_equal &quot;100644&quot;, tree.mode
     assert_equal &quot;grit.rb&quot;, tree.name
   end
-  
+
   def test_content_from_string_tree_should_return_submodule
     text = fixture('ls_tree_submodule').split(&quot;\n&quot;).first
-    
+
     sm = @t.content_from_string(nil, text)
-    
+
     assert_kind_of Submodule, sm
   end
-  
+
   def test_content_from_string_invalid_type_should_raise
     assert_raise(RuntimeError) do
       @t.content_from_string(nil, &quot;040000 bogus 650fa3f0c17f1edb4ae53d8dcca4ac59d86e6c44	test&quot;)
     end
   end
-  
+
   # /
-  
+
   def test_slash
     Git.any_instance.expects(:ls_tree).returns(
       fixture('ls_tree_a')
     )
     tree = @r.tree('master')
-    
+
     assert_equal 'aa06ba24b4e3f463b3c4a85469d0fb9e5b421cf8', (tree/'lib').id
     assert_equal '8b1e02c0fb554eed2ce2ef737a68bb369d7527df', (tree/'README.txt').id
   end
-  
+
   def test_slash_with_commits
     Git.any_instance.expects(:ls_tree).returns(
       fixture('ls_tree_commit')
     )
     tree = @r.tree('master')
-    
+
     assert_equal 'd35b34c6e931b9da8f6941007a92c9c9a9b0141a', (tree/'bar').id
     assert_equal '2afb47bcedf21663580d5e6d2f406f08f3f65f19', (tree/'foo').id
     assert_equal 'f623ee576a09ca491c4a27e48c0dfe04be5f4a2e', (tree/'baz').id
   end
-  
+
   # inspect
-  
+
   def test_inspect
     @t = Tree.create(@r, :id =&gt; 'abc')
     assert_equal %Q{#&lt;Grit::Tree &quot;abc&quot;&gt;}, @t.inspect
   end
-  
+
   def test_basename
     @t = Tree.create(@r, :name =&gt; 'foo/bar')
     assert_equal &quot;bar&quot;, @t.basename</diff>
      <filename>test/test_tree.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>fa4a01c152089b4ebf848b2009930aff5bfa4fbd</id>
    </parent>
  </parents>
  <author>
    <name>Tom Preston-Werner</name>
    <email>tom@mojombo.com</email>
  </author>
  <url>http://github.com/mojombo/grit/commit/18ec70e91691084279d810d49b91da1191ea1fc1</url>
  <id>18ec70e91691084279d810d49b91da1191ea1fc1</id>
  <committed-date>2009-10-27T12:35:43-07:00</committed-date>
  <authored-date>2009-10-27T12:35:43-07:00</authored-date>
  <message>massive whitespace removal</message>
  <tree>edab2c605ae31a57982cb49e407cc403f7174960</tree>
  <committer>
    <name>Tom Preston-Werner</name>
    <email>tom@mojombo.com</email>
  </committer>
</commit>
