lib/makit/git.rb in makit-0.0.21 vs lib/makit/git.rb in makit-0.0.22

- old
+ new

@@ -37,9 +37,23 @@ def self.zip_source_files(zipfilename) "git archive --format zip --output #{zipfilename} HEAD".run end + def self.get_file_infos() + file_infos = [] + command = `git ls-files` + command.split("\n").map do |path| + begin + file_infos << FileInfo.new(name: path, mtime: File.mtime(path), size: File.size(path)) + rescue + next + end + end + file_infos.sort_by! { |info| info.mtime }.reverse! + file_infos + end + def self.branch `git branch --show-current`.strip end def self.commitsha