# File lib/grit/git-ruby/repository.rb, line 549 def get_subtree(commit_sha, path) tree_sha = get_object_by_sha1(commit_sha).tree if path && !(path == '' || path == '.' || path == './') paths = path.split('/') paths.each do |path| tree = get_object_by_sha1(tree_sha) if entry = tree.entry.select { |e| e.name == path }.first tree_sha = entry.sha1 rescue nil else return false end end end tree_sha end