./lib/dolt/git/shell.rb in dolt-0.1.0 vs ./lib/dolt/git/shell.rb in dolt-0.1.1
- old
+ new
@@ -27,9 +27,13 @@
def show(path, ref)
git("show", "#{ref}:#{path}")
end
+ def ls_tree(path, ref)
+ git("ls-tree", ref, path.sub(/(^\.?\/)?/, "./").sub(/\/?$/, "/"))
+ end
+
def git(command, *args)
base = "git --git-dir #{@git_dir} --work-tree #{@work_tree}"
cmd = "#{base} #{command} #{args.join(' ')}".strip
Dolt::DeferrableChildProcess.open(cmd)
end