def file_stats(range = current_branch)
      support! :file_stats

      stats = {}
      commits(range).each_value do |commit|
        commit.added_files.each do |file|
          stats[file] = { :modifications => 0 } unless stats.key? file
          stats[file][:added_date] = commit.authored_date
          stats[file][:modifications] += 1
        end
        commit.modified_files.each do |file|
          stats[file] = { :modifications => 0 } unless stats.key? file
          stats[file][:last_modified_date] = commit.authored_date
          stats[file][:modifications] += 1
        end
        commit.deleted_files.each do |file|
          stats[file] = { :modifications => 0 } unless stats.key? file
          stats[file][:deleted_date] = commit.authored_date
        end
      end

      stats
    end
def file_stats(range = current_branch)
      support! :file_stats

      stats = {}
      commits(range).each_value do |commit|
        commit.added_files.each do |file|
          stats[file] = { :modifications => 0 } unless stats.key? file
          stats[file][:added_date] = commit.authored_date
          stats[file][:modifications] += 1
        end
        commit.modified_files.each do |file|
          stats[file] = { :modifications => 0 } unless stats.key? file
          stats[file][:last_modified_date] = commit.authored_date
          stats[file][:modifications] += 1
        end
        commit.deleted_files.each do |file|
          stats[file] = { :modifications => 0 } unless stats.key? file
          stats[file][:deleted_date] = commit.authored_date
        end
      end

      stats
    end
This evaluates basic statistics about the files in a given commit range.

 @example
  repo.file_stats
  => {
       'a_file.rb' => {
         :added_date => Tue Mar 29 16:13:47 +0200 2011,
         :deleted_date => Sun Jun 05 12:56:18 +0200 2011,
         :last_modified_date => Thu Apr 21 20:08:00 +0200 2011,
         :modifications => 9
       }
     }
 @param [String, Range] range The range of commits for which the file
        stats should be retrieved. This may be given as a string
        (`'master..development'`), a range (`'master'..'development'`) or
        as a single ref (`'master'`). A single ref name means all commits
        reachable from that ref.
 @return [Hash<String, Hash<Symbol, Object>>] Each file is returned as a
         key in this hash. The value of this key is another hash
         containing the stats for this file. Depending on the state of the
         file this includes `:added_date`, `:last_modified_date`,
         `:last_modified_date` and `'master..development'`.
 @see Commit#added_files
 @see Commit#deleted_files
 @see Commit#modified_files