Sha256: 2d065fc852bd338237b15eee187d61947982e82fbb04a428b5b2c54f6d556aa0
Contents?: true
Size: 1.94 KB
Versions: 5
Compression:
Stored size: 1.94 KB
Contents
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>cat_file (Grit::GitRuby)</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" /> </head> <body class="standalone-code"> <pre><span class="ruby-comment cmt"># File lib/grit/git-ruby.rb, line 21</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cat_file</span>(<span class="ruby-identifier">options</span>, <span class="ruby-identifier">ref</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:t</span>] <span class="ruby-identifier">file_type</span>(<span class="ruby-identifier">ref</span>) <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:s</span>] <span class="ruby-identifier">file_size</span>(<span class="ruby-identifier">ref</span>) <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:p</span>] <span class="ruby-identifier">try_run</span> { <span class="ruby-identifier">ruby_git</span>.<span class="ruby-identifier">cat_file</span>(<span class="ruby-identifier">ref</span>) } <span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Grit</span><span class="ruby-operator">::</span><span class="ruby-constant">GitRuby</span><span class="ruby-operator">::</span><span class="ruby-constant">Repository</span><span class="ruby-operator">::</span><span class="ruby-constant">NoSuchShaFound</span> <span class="ruby-value str">''</span> <span class="ruby-keyword kw">end</span></pre> </body> </html>
Version data entries
5 entries across 5 versions & 1 rubygems