lib/licensed/git.rb in licensed-1.2.0 vs lib/licensed/git.rb in licensed-1.3.0
- old
+ new
@@ -32,8 +32,14 @@
# sha - commit sha to retrieve date
def commit_date(sha)
return unless available? && sha
Licensed::Shell.execute("git", "show", "-s", "-1", "--format=%ct", sha)
end
+
+ def files
+ return unless available?
+ output = Licensed::Shell.execute("git", "ls-tree", "--full-tree", "-r", "--name-only", "HEAD")
+ output.lines.map(&:strip)
+ end
end
end
end