Method: Grit::GitRuby#cat_file
- Defined in:
- lib/grit/git-ruby.rb
#cat_file(options, sha) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/grit/git-ruby.rb', line 20 def cat_file(, sha) if [:t] file_type(sha) elsif [:s] file_size(sha) elsif [:p] try_run { ruby_git.cat_file(sha) } end rescue Grit::GitRuby::Repository::NoSuchShaFound '' end |